Compensation faille de sécurité NginX+PHP-FPM
This commit is contained in:
@@ -21,6 +21,7 @@ server {
|
||||
## Inter PHP en path_info
|
||||
location ~ ^/(index).php(/.*)+ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
try_files $fastcgi_script_name =404;
|
||||
fastcgi_pass unix:/var/run/php/php{{ php_version }}-fpm.sock;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
@@ -6,6 +6,8 @@ server {
|
||||
allow 10.233.212.64/27;
|
||||
allow 2a01:cb0c:8516:7f00::/64;
|
||||
allow 83.167.52.81;
|
||||
allow 163.172.112.19;
|
||||
allow 2001:bc8:26c1:103::/64;
|
||||
allow 2001:1b48:2:103::/64;
|
||||
allow 2001:bc8:26c1:101::/64;
|
||||
deny all;
|
||||
|
@@ -24,6 +24,7 @@ server {
|
||||
|
||||
location ~ /(app).php(/.*)+ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
try_files $fastcgi_script_name =404;
|
||||
fastcgi_pass unix:/var/run/php/php{{ php_version }}-fpm.sock;
|
||||
fastcgi_read_timeout 60;
|
||||
include fastcgi_params;
|
||||
|
@@ -37,7 +37,7 @@ server {
|
||||
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
||||
|
||||
location / {
|
||||
rewrite ^ /index.php$request_uri;
|
||||
rewrite ^ /index.php;
|
||||
}
|
||||
|
||||
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
|
||||
@@ -50,6 +50,7 @@ server {
|
||||
|
||||
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
try_files $fastcgi_script_name =404;
|
||||
fastcgi_param modHeadersAvailable true;
|
||||
fastcgi_param front_controller_active true;
|
||||
fastcgi_intercept_errors on;
|
||||
|
@@ -61,6 +61,7 @@ server {
|
||||
# Interprétation PHP
|
||||
location ~ ^/(index).php(/.*)+ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
try_files $fastcgi_script_name =404;
|
||||
fastcgi_cache wpdojo;
|
||||
fastcgi_cache_key $request_method$host$request_uri;
|
||||
fastcgi_cache_valid any 15m;
|
||||
|
Reference in New Issue
Block a user