init
This commit is contained in:
27
nginx.conf
Normal file
27
nginx.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Enable clean URLs without .html extension
|
||||
location / {
|
||||
# Try the exact URI, then with .html, then as directory with index.html, then 404
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
# Don't redirect mobile.html to allow device-specific routing
|
||||
# Skip the .html redirect for mobile.html and index.html
|
||||
location = /mobile.html {
|
||||
try_files /mobile.html =404;
|
||||
}
|
||||
|
||||
location = /index.html {
|
||||
try_files /index.html =404;
|
||||
}
|
||||
|
||||
# Gzip compression for better performance
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
|
||||
}
|
||||
Reference in New Issue
Block a user