1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yourls_ynh.git synced 2024-09-03 20:35:59 +02:00
yourls_ynh/conf/nginx.conf

33 lines
811 B
Nginx Configuration File
Raw Normal View History

2014-06-15 22:43:38 +02:00
location PATHTOCHANGE {
2014-06-16 10:52:28 +02:00
alias ALIASTOCHANGE;
2014-06-15 22:45:03 +02:00
2014-06-16 10:52:28 +02:00
try_files $uri $uri/ @yourls;
2014-06-16 10:43:17 +02:00
2014-06-16 10:52:28 +02:00
index index.php index.html index.htm;
2014-06-15 22:36:13 +02:00
2014-06-16 10:52:28 +02:00
if (-f $request_filename) {
expires max;
break;
2014-06-16 10:48:07 +02:00
}
2014-06-16 10:52:28 +02:00
if (!-e $request_filename) {
rewrite ^/([0-9a-z]+)/?$ /yourls-go.php?id=$1 last;
rewrite ^/([0-9a-z]+)\+/?$ /yourls-infos.php?id=$1 last;
rewrite ^/([0-9a-z]+)\+all/?$ /yourls-infos.php?id=$1&all=1 last;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
2014-06-16 10:48:07 +02:00
fastcgi_index index.php;
2014-06-16 10:52:28 +02:00
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2014-06-16 10:48:07 +02:00
include fastcgi_params;
}
2014-06-16 10:52:28 +02:00
location ~ /\.ht {
2014-06-16 10:48:07 +02:00
deny all;
}
2014-06-16 07:19:09 +02:00
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
2014-06-13 15:06:28 +02:00
}