nginx conf

This commit is contained in:
artem 2024-04-25 21:54:48 +03:00
parent af2a3b36fe
commit 17258c7631
1 changed files with 4 additions and 10 deletions

View File

@ -6,15 +6,9 @@ server {
gzip_vary on; gzip_vary on;
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype; gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype;
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|otf|xml|txt)$ {
root /usr/share/nginx/html/browser;
try_files $uri /index.html;
}
location / { location / {
proxy_set_header X-Forwarded-For $remote_addr; root /usr/share/nginx/html;
proxy_set_header Host $http_host; try_files $uri /index.html;
proxy_pass http://localhost:4000;
} }
#error_page 404 /404.html; #error_page 404 /404.html;
@ -23,13 +17,13 @@ server {
# #
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
location = /50x.html { location = /50x.html {
root /usr/share/nginx/html; root /usr/share/nginx/html;
} }
# deny access to hidden files like .git etc # deny access to hidden files like .git etc
# concurs with nginx's one # concurs with nginx's one
# #
location ~ /\. { location ~ /\. {
deny all; deny all;
} }
} }