Skip to content

Commit

Permalink
fix nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
SachaWildCode committed Jun 19, 2024
1 parent 85bff2a commit 7eb3c7c
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,44 @@ http {
sendfile on;
keepalive_timeout 65;

# Server block for the domain
server {
listen 80;
server_name localhost;
server_name heartlink.slghive.fr;

location / {
proxy_pass http://116.202.238.184;
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 / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

# Server block for the IP address to redirect to the domain
server {
listen 80;
server_name 116.202.238.184;

return 301 http://heartlink.slghive.fr$request_uri;
}

# Default server block (optional, can be removed if not needed)
server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
Expand Down

0 comments on commit 7eb3c7c

Please sign in to comment.