Update server port in .env.example and add nginx configuration for portal.monacousa.org

This commit is contained in:
Matt 2025-08-06 14:48:09 +02:00
parent 8fb2e80f91
commit f6acee6148
2 changed files with 42 additions and 1 deletions

View File

@ -1,5 +1,5 @@
# Server Configuration
NUXT_PORT=3001
NUXT_PORT=6060
NUXT_HOST=0.0.0.0
# Keycloak Configuration

41
nginx-portal.conf Normal file
View File

@ -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;
}
}