piler/contrib/webserver/piler-nginx.conf

64 lines
2.3 KiB
Plaintext
Raw Normal View History

2013-08-04 12:33:34 +02:00
server {
server_name PILER_HOST;
2013-08-04 12:33:34 +02:00
root /var/piler/www;
2013-08-04 12:33:34 +02:00
2014-06-05 10:08:35 +02:00
gzip on;
gzip_types text/plain application/xml text/css;
gzip_vary on;
2013-08-04 12:33:34 +02:00
location / {
index index.php index.html;
2015-07-28 21:58:17 +02:00
try_files $uri $uri/ /index.php;
2013-08-04 12:33:34 +02:00
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
2014-04-17 15:39:59 +02:00
location ~ [^/]\.php(/|$) {
2015-07-28 21:58:17 +02:00
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2014-04-17 15:39:59 +02:00
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
2014-04-17 15:39:59 +02:00
fastcgi_index index.php;
include fastcgi_params;
2013-08-04 12:33:34 +02:00
}
2014-06-05 10:08:35 +02:00
location ~* \.(ico|css|js|gif|jpe?g|png)$ {
expires 2w;
}
2014-04-17 15:39:59 +02:00
2013-08-04 12:33:34 +02:00
rewrite /search.php /index.php?route=search/search&type=simple;
rewrite /advanced.php /index.php?route=search/search&type=advanced;
rewrite /expert.php /index.php?route=search/search&type=expert;
rewrite /search-helper.php /index.php?route=search/helper;
rewrite /audit-helper.php /index.php?route=audit/helper;
rewrite /message.php /index.php?route=message/view;
rewrite /bulkrestore.php /index.php?route=message/bulkrestore;
2015-07-07 14:12:35 +02:00
rewrite /bulkremove.php /index.php?route=message/bulkremove;
rewrite /rejectremove.php /index.php?route=message/rejectremove;
2013-11-17 22:57:54 +01:00
rewrite /bulkpdf.php /index.php?route=message/bulkpdf;
2013-08-04 12:33:34 +02:00
rewrite /folders.php /index.php?route=folder/list&;
rewrite /settings.php /index.php?route=user/settings;
rewrite /login.php /index.php?route=login/login;
rewrite /logout.php /index.php?route=login/logout;
rewrite /google.php /index.php?route=login/google;
2013-08-25 22:18:01 +02:00
rewrite /domain.php /index.php?route=domain/domain;
rewrite /ldap.php /index.php?route=ldap/list;
rewrite /customer.php /index.php?route=customer/list;
rewrite /retention.php /index.php?route=policy/retention;
rewrite /archiving.php /index.php?route=policy/archiving;
rewrite /legalhold.php /index.php?route=policy/legalhold;
2013-08-04 12:33:34 +02:00
rewrite /view/javascript/piler.js /js.php;
}