91 lines
2.0 KiB
Nginx Configuration File
91 lines
2.0 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;
|
|
# root /var/www/html;
|
|
# location / {
|
|
# index index.html;
|
|
# }
|
|
|
|
# location / {
|
|
# # root /var/www/html;
|
|
# index /var/www/html/index.html;
|
|
# # index pong/pong.html;
|
|
# autoindex on;
|
|
# # try_files /pong/pong.html;
|
|
# }
|
|
location /{
|
|
# index /
|
|
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://react_app:8080;
|
|
}
|
|
|
|
location /api {
|
|
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:3000/api;
|
|
}
|
|
|
|
# location /api {
|
|
# 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:3000/api;
|
|
# }
|
|
|
|
|
|
#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;
|
|
# }
|
|
# }
|