Add nginx.conf
This commit is contained in:
parent
cf0d92e149
commit
a127152333
1 changed files with 26 additions and 0 deletions
26
nginx.conf
Normal file
26
nginx.conf
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
# Define the root directory for the site
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
# Specify the index files
|
||||
index index.html index.htm;
|
||||
|
||||
# Handle requests
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Custom error pages
|
||||
error_page 404 /404.html;
|
||||
location = /404.html {
|
||||
internal;
|
||||
}
|
||||
|
||||
# Optional: Add gzip compression for better performance
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
gzip_min_length 1000;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue