ali-lunchy / nginx.conf
bibekyess's picture
Update nginx.conf
c9ad5e0 verified
raw
history blame contribute delete
475 Bytes
server {
listen 7860;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
# Explicitly deny access to the .git directory
location /.git {
deny all;
return 404;
}
# Allow only .html, .js, and .json files; deny everything else with extensions
location ~* \.(?!html$|js$|json$)[^./]+$ {
deny all;
return 403;
}
}