GisServer/templates/nginx/lizmap.conf.j2

54 lines
1.5 KiB
Plaintext
Raw Normal View History

2024-04-06 22:50:53 +02:00
# @path: /etc/nginx/sites-available/lizmap.conf
# @permission: -rw-r--r-- 1 root root
server {
listen 80 default_server;
listen [::]:80 default_server;
index index.php index.html index.htm index.nginx-debian.html;
server_name lizmap-web;
root /var/www/html/lizmap;
index index.php index.html index.htm;
# compression setting
gzip_vary on;
gzip_proxied any;
gzip_comp_level 5;
gzip_min_length 100;
gzip_http_version 1.1;
gzip_types text/plain
text/css
application/json
application/javascript
text/xml
application/xml
application/xml+rss
text/javascript
text/json;
location / {
try_files $uri $uri/ =404;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
set $path_info
$fastcgi_path_info; # because of bug http://trac.nginx.org/nginx/ticket/321
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param PATH_TRANSLATED $document_root$path_info;
fastcgi_pass unix:/run/php/php{{ php['version'] }}-fpm.sock;
2024-04-06 22:50:53 +02:00
fastcgi_param SERVER_NAME $http_host;
}
}