Fix SERVER_ADDR overwritten by a default value

Move include to top of location block, improve comments #2
This commit is contained in:
Eddy
2023-04-11 15:07:42 +00:00
committed by GitHub
parent a489d0ebc4
commit e2562621be

View File

@@ -6,7 +6,7 @@ server {
root /var/www/html;
index index.php index.html index.htm;
# Cloudflare IPs, this is used to obtain real of a user IP
# Cloudflare IPs, this is used to obtain real IP of a user when under reverse proxy
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
@@ -42,18 +42,16 @@ server {
}
location ~ \.php$ {
include fastcgi_params;
try_files $uri /index.php =404;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_ADDR IP_OF_YOUR_SERVER; # This needs to be your public IP of the server, used to verify WHMCS license
fastcgi_param SERVER_ADDR IP_OF_YOUR_SERVER; # Used to verify WHMCS license
fastcgi_param HTTPS on;
# fixes timeouts
fastcgi_read_timeout 600;
include fastcgi_params;
}
location ~* \.(jpg|jpeg|gif|png|svg|webp|css|js|ico|xml)$ {