From f6acee6148072a641c7b394d04dcc1cf98c51dca Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 6 Aug 2025 14:48:09 +0200 Subject: [PATCH] Update server port in .env.example and add nginx configuration for portal.monacousa.org --- .env.example | 2 +- nginx-portal.conf | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 nginx-portal.conf diff --git a/.env.example b/.env.example index 1dd7940..b36fbc5 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,5 @@ # Server Configuration -NUXT_PORT=3001 +NUXT_PORT=6060 NUXT_HOST=0.0.0.0 # Keycloak Configuration diff --git a/nginx-portal.conf b/nginx-portal.conf new file mode 100644 index 0000000..49aad54 --- /dev/null +++ b/nginx-portal.conf @@ -0,0 +1,41 @@ +server { + listen 80; + server_name portal.monacousa.org; + + location / { + return 301 https://$host$request_uri; + } + + location ^~ /.well-known/acme-challenge/ { + alias /var/www/html/.well-known/acme-challenge/; + default_type "text/plain"; + allow all; + } +} + +server { + listen 443 ssl; + server_name portal.monacousa.org; + + ssl_certificate /etc/letsencrypt/live/portal.monacousa.org/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/portal.monacousa.org/privkey.pem; + + access_log /var/log/nginx/portal.monacousa.org.access.log combined; + error_log /var/log/nginx/portal.monacousa.org.error.log warn; + + location / { + proxy_pass http://127.0.0.1:6060; + proxy_http_version 1.1; + proxy_set_header Connection "close"; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location ^~ /.well-known/acme-challenge/ { + alias /var/www/html/.well-known/acme-challenge/; + default_type "text/plain"; + allow all; + } +}