mirror of
https://github.com/mykitserver/docker-limesurvey.git
synced 2025-12-06 16:39:11 +01:00
58 lines
1.5 KiB
Plaintext
58 lines
1.5 KiB
Plaintext
worker_processes 1;
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
server_tokens off;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
server {
|
|
listen 443 ssl;
|
|
index index.php;
|
|
set $host_path "/var/www/html";
|
|
root /var/www/html;
|
|
server_name _;
|
|
charset utf-8;
|
|
include /etc/nginx/mime.types;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
location / {
|
|
try_files $uri /index.php?$args;
|
|
}
|
|
location ~ ^/(protected|framework|themes/\w+/views) {
|
|
deny all;
|
|
}
|
|
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
|
|
try_files $uri =404;
|
|
}
|
|
location ~ \.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
|
try_files $uri index.php;
|
|
include fastcgi_params;
|
|
fastcgi_index index.php;
|
|
fastcgi_pass limesurvey:9000;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
|
}
|
|
}
|
|
}
|