61 lines
1.8 KiB
Nginx Configuration File
61 lines
1.8 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name quiz.ianvink.nl;
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_set_header Connection '';
|
|
proxy_http_version 1.1;
|
|
proxy_read_timeout 360s;
|
|
|
|
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;
|
|
# add_header 'Access-Control-Allow-Origin' '*'; # Adjust this to your frontend domain
|
|
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; # Include POST
|
|
# add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization'; # Include any other headers
|
|
|
|
proxy_pass http://backend:9090/;
|
|
}
|
|
}
|
|
|
|
# server {
|
|
# listen 80;
|
|
# server_name quiz.ianvink.nl;
|
|
|
|
# location /.well-known/acme-challenge/ {
|
|
# root /usr/share/nginx/html; # Adjust this if needed
|
|
# }
|
|
|
|
# location / {
|
|
# return 301 https://$host$request_uri;
|
|
# }
|
|
# }
|
|
|
|
# server {
|
|
# listen 443 ssl;
|
|
# server_name quiz.example.com;
|
|
|
|
# ssl_certificate /etc/letsencrypt/live/quiz.example.com/fullchain.pem;
|
|
# ssl_certificate_key /etc/letsencrypt/live/quiz.example.com/privkey.pem;
|
|
|
|
# location / {
|
|
# root /usr/share/nginx/html;
|
|
# index index.html;
|
|
# try_files $uri $uri/ /index.html;
|
|
# }
|
|
|
|
# location /api/ {
|
|
# proxy_pass http://backend:9090/; # Adjust this if needed
|
|
# 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;
|
|
# }
|
|
# } |