[+] Add nginx configuration template

pull/30/head
2024-05-01 01:26:08 +08:00 committed by GitHub
parent 7090e0a47b
commit 65f0bfa8a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,38 @@
server {
listen 443 ssl;
server_name aqua.example.com;
ssl_certificate /etc/nginx/certs/aqua.example.com.crt;
ssl_certificate_key /etc/nginx/certs/aqua.example.com.key;
# Absolute path to store the compiled AquaNet,
# there should be index.html in the directory.
location / {
root /var/www/html/AquaNet/;
try_files $uri $uri/ @router;
index index.html;
}
# Route for redirection to index.html
location @router{
rewrite ^.*$ /index.html last;
}
# If you have modified DATA_HOST,
# you will need to prepare your own resources.
# location /d/ {
# root /var/www/html/GameData/;
# }
# Reverse Proxy to your AquaDX.
location /aqua/ {
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1/;
proxy_buffering off;
}
}