Private
Public Access
2
0
This commit is contained in:
2026-01-20 17:40:16 +03:00
parent cda556eec6
commit b78da80550
83 changed files with 108 additions and 82 deletions

View File

@@ -0,0 +1,50 @@
server {
listen 80;
server_name {{ wordpress_site }} www.{{ wordpress_site }};
root /var/www/{{ wordpress_user }}/{{ wordpress_site }};
index index.html index.htm index.php;
client_max_body_size 50M;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
location ~ /\.ht {
deny all;
}
location ~ /wp-config\.php\$ {
deny all;
}
location ~ /wp-content/uploads/.*\.php\$ {
deny all;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php-fpm.sock;
}
# Réécritures pour WordPress
location ~ ^/index\.php$ { }
location / {
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php last;
break;
}
}
# location / {
# try_files \$uri \$uri/ /index.php?\$args;
# }
# location ~ \.php\$ {
# include snippets/fastcgi-php.conf;
# fastcgi_pass unix:/var/run/php/php-fpm.sock;
# fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
# }
}