Skip to content
Snippets Groups Projects
Commit e91f75a1 authored by Ismael Posada Trobo's avatar Ismael Posada Trobo
Browse files

tests

parent fae7cbb4
Branches perf-nginx
No related tags found
1 merge request!11Perf nginx
Pipeline #2698289 passed
......@@ -2,6 +2,8 @@ upstream php {
server unix:/var/run/drupal.sock;
}
#proxy_cache_path /var/cache/nginx keys_zone=one:10m max_size=200m;
server {
#listen 8080 ssl;
listen 8080;
......@@ -20,10 +22,27 @@ server {
gzip_comp_level 5;
gzip_types application/json text/css text/javascript application/x-javascript application/javascript image/svg+xml;
gzip_proxied any;
sendfile on;
keepalive_timeout 25;
etag off;
# Disables specifying the port in absolute redirects
port_in_redirect off;
location / {
# try_files $uri @rewrite; # For Drupal <= 6
try_files $uri /index.php?$query_string; # For Drupal >= 7
}
# https://drupal.stackexchange.com/questions/192151/cannot-install-any-theme
rewrite ^/core/authorize.php/core/authorize.php(.*)$ /core/authorize.php$1;
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}
location = /favicon.ico {
log_not_found off;
access_log off;
......@@ -47,10 +66,8 @@ server {
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
}
}
# https://drupal.stackexchange.com/questions/192151/cannot-install-any-theme
rewrite ^/core/authorize.php/core/authorize.php(.*)$ /core/authorize.php$1;
location ~ \..*/.*\.php$ {
return 403;
}
......@@ -74,16 +91,7 @@ server {
# as Subversion or Git to store control files.
location ~ (^|/)\. {
return 403;
}
location / {
# try_files $uri @rewrite; # For Drupal <= 6
try_files $uri /index.php?$query_string; # For Drupal >= 7
}
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}
}
# Don't allow direct access to PHP files in the vendor directory.
location ~ /vendor/.*\.php$ {
......@@ -135,23 +143,10 @@ server {
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
try_files $uri @rewrite;
expires max;
access_log off;
log_not_found off;
}
location ^~ /simplesaml {
alias /app/vendor/simplesamlphp/simplesamlphp/www;
location ~ ^(?<prefix>/simplesaml)(?<phpfile>.+?\.php)(?<pathinfo>/.*)?$ {
include fastcgi_params;
fastcgi_pass php;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+?\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$phpfile;
fastcgi_param PATH_INFO $pathinfo if_not_empty;
}
}
# We want to make the redirection https://sitename.web.cern.ch/sitename/sites/something to https://sitename.web.cern.ch/sites/default/.
# This location matches any url containing /sites/sitename/.../file and redirects to /sites/default/.../file.
# It omits redirection for urls containing /sites/default.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment