docker-rainloop/nginx/nginx.conf
2022-03-28 12:36:29 +02:00

76 lines
1.7 KiB
Nginx Configuration File

# author: Daniel Sommer <daniel.sommer@velvettear.de>
# license: MIT
user nginx nginx;
worker_processes auto;
daemon off;
pcre_jit on;
include /etc/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens off;
access_log /dev/stdout;
error_log /dev/stderr error;
client_max_body_size 0;
keepalive_timeout 60;
sendfile on;
gzip on;
gzip_vary on;
tcp_nodelay on;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/webapps/rainloop;
index index.php;
error_page 403 =200 https://$host;
error_page 404 =200 https://$host;
client_max_body_size 0;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_keep_conn on;
fastcgi_pass unix:/run/php-fpm8/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
location ^~ /data {
deny all;
}
}
}