66 lines
1.3 KiB
Nginx Configuration File
66 lines
1.3 KiB
Nginx Configuration File
# server {
|
|
# location / {
|
|
# 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;
|
|
|
|
# proxy_pass http://backend:5000;
|
|
# }
|
|
# }
|
|
|
|
server {
|
|
# listen 443 ssl;
|
|
# listen 80 ssl;
|
|
# listen 443 ssl;
|
|
listen 80;
|
|
|
|
# server_name homemadePong.42.fr;
|
|
|
|
# ssl_protocols TLSv1.3;
|
|
# ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
|
|
# ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
|
|
|
|
# root /var/www/html;
|
|
# index index.html;
|
|
|
|
# autoindex on;
|
|
location / {
|
|
root /var/www/html;
|
|
index index.html;
|
|
}
|
|
|
|
|
|
location /api/login {
|
|
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;
|
|
|
|
proxy_pass http://backend:5000;
|
|
}
|
|
|
|
|
|
#proxy_pass http://localhost:5000
|
|
}
|
|
|
|
|
|
|
|
# server {
|
|
# listen 80;
|
|
# server_name localhost;
|
|
|
|
# }
|
|
|
|
# upstream loadbalancer {
|
|
# server backend:5000;
|
|
# }
|
|
|
|
# server {
|
|
# listen 80;
|
|
# server_name localhost;
|
|
# location / {
|
|
# proxy_pass http://loadbalancer;
|
|
# }
|
|
# }
|