From 65f0bfa8a42c134318aad6f435b2543707141f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91?= Date: Wed, 1 May 2024 01:26:08 +0800 Subject: [PATCH] [+] Add nginx configuration template --- AquaNet/nginx.conf.example | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 AquaNet/nginx.conf.example diff --git a/AquaNet/nginx.conf.example b/AquaNet/nginx.conf.example new file mode 100644 index 00000000..dc444905 --- /dev/null +++ b/AquaNet/nginx.conf.example @@ -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; + } +}