Skip to content

Commit

Permalink
Update default.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-titan authored Dec 16, 2024
1 parent 6f53d82 commit 4b14bf7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ server {
set_real_ip_from 0.0.0.0/0; # Replace with Traefik's IP range if known
real_ip_header X-Forwarded-For;

# Redirect HTTP to HTTPS if forwarded by Traefik
if ($http_x_forwarded_proto = 'https') {
return 301 https://$host$request_uri;
}

# Location block to pass PHP scripts to FastCGI (PHP-FPM) server
location ~ \.php$ {
try_files $uri =404;
Expand Down

0 comments on commit 4b14bf7

Please sign in to comment.