server { listen 80; server_name intrasnl.org intrasnl.fr www.intrasnl.org www.intrasnl.fr; root {{ webserver_vhost_root }}/; include /etc/nginx/ssl.conf; include /etc/nginx/local.conf; if ($host = 'intrasnl.fr') { return 301 https://intrasnl.org$request_uri; } if ($host = 'www.intrasnl.fr') { return 301 https://intrasnl.org$request_uri; } if ($host = 'www.intrasnl.org') { return 301 https://intrasnl.org$request_uri; } if ($scheme != "https") { return 301 https://$host$request_uri; } client_max_body_size 300m; index index.php; location /favicon.ico { log_not_found off; access_log off; } location / { # Redirect everything that isn't a real file to index.php try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { try_files $uri /index.php =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_intercept_errors on; fastcgi_read_timeout 300; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; } }