Skip to content

Commit

Permalink
commented out some nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
fulanii committed Dec 18, 2024
1 parent a8edd09 commit 6abb943
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,30 @@ http {
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

# Redirect all HTTP requests to HTTPS non-www
server {
listen 80;
server_name autoblue.yassinecodes.dev;
return 301 https://$host$request_uri;
}
# # Redirect all HTTP requests to HTTPS non-www
# server {
# listen 80;
# server_name autoblue.yassinecodes.dev;
# return 301 https://$host$request_uri;
# }

# Redirect HTTP www to HTTPS non-www
server {
listen 80;
server_name www.autoblue.yassinecodes.dev;
return 301 https://autoblue.yassinecodes.dev$request_uri;
}
# # Redirect HTTP www to HTTPS non-www
# server {
# listen 80;
# server_name www.autoblue.yassinecodes.dev;
# return 301 https://autoblue.yassinecodes.dev$request_uri;
# }

# Redirect HTTPS www to non-www
server {
listen 443 ssl;
server_name www.autoblue.yassinecodes.dev;
# # Redirect HTTPS www to non-www
# server {
# listen 443 ssl;
# server_name www.autoblue.yassinecodes.dev;

ssl_certificate /etc/letsencrypt/live/autoblue.yassinecodes.dev/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/autoblue.yassinecodes.dev/privkey.pem;
# ssl_certificate /etc/letsencrypt/live/autoblue.yassinecodes.dev/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/autoblue.yassinecodes.dev/privkey.pem;

return 301 https://autoblue.yassinecodes.dev$request_uri;
}
# return 301 https://autoblue.yassinecodes.dev$request_uri;
# }

# Main server block
server {
Expand All @@ -57,7 +57,7 @@ http {

# Proxy pass to Django (Gunicorn)
location / {
proxy_pass http://172.18.0.5:8000; # Ensure Gunicorn runs HTTP
proxy_pass http://172.18.0.5:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down

0 comments on commit 6abb943

Please sign in to comment.