vdo.ninja/app/nginx.conf
2023-09-25 19:43:56 +02:00

33 lines
721 B
Nginx Configuration File

events {
worker_connections 1024;
}
http {
include mime.types;
sendfile on;
server {
listen 80;
listen [::]:80;
server_name vdo.ninja;
root /app/static;
index index.html;
location ~ ^/([^/]+)/([^/?]+)$ {
root /app/static;
try_files /$1/$2 /$1/$2.html /$1/$2/ /$2 /$2/ /$1/index.html;
add_header Access-Control-Allow-Origin *;
}
location / {
if ($request_uri ~ ^/(.*)\.html$) {
return 302 /$1;
}
try_files $uri $uri.html $uri/ /index.html;
add_header Access-Control-Allow-Origin *;
}
}
}