31 lines
671 B
Nginx Configuration File
31 lines
671 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _; # default catch-all
|
|
|
|
# Root for the main landing page
|
|
root /usr/share/nginx/html;
|
|
|
|
# Serve the index page by default
|
|
index index.html;
|
|
|
|
# Explicit location for /mongo-ops/
|
|
location /mongo-ops/ {
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
}
|
|
|
|
# Explicit location for /mongo-ops/
|
|
location /api/blog/ {
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
}
|
|
|
|
# Optional: serve static assets (CSS, JS, images)
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
}
|