Skip to content

Instantly share code, notes, and snippets.

@benhartwich
Last active October 2, 2018 07:10
Show Gist options
  • Save benhartwich/f2a421e169e5c8a5d4dcfa4bc67ddd7b to your computer and use it in GitHub Desktop.
Save benhartwich/f2a421e169e5c8a5d4dcfa4bc67ddd7b to your computer and use it in GitHub Desktop.
LimeSurvey nginx
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name xy.com;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
ssl_certificate /etc/letsencrypt/live/xy.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/xy.com/privkey.pem;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
root /var/kunden/lime/httpdocs;
client_max_body_size 15m;
pagespeed off;
location / {
try_files $uri /index.php?$args;
}
location ~ ^/(protected|framework|themes/\w+/views) {
deny all;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
try_files $uri index.php;
fastcgi_pass unix:/var/run/php/php7.1-fpm-lime.sock; # Change this to match your settings
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment