mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-11 13:48:38 +00:00
33 lines
721 B
Nginx Configuration File
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 *;
|
|
}
|
|
}
|
|
} |