mirror of
https://github.com/YunoHost/example_ynh.git
synced 2024-09-03 20:06:13 +02:00
parent
d86c2522b9
commit
499e2811a2
1 changed files with 41 additions and 26 deletions
|
@ -1,33 +1,48 @@
|
||||||
location YNH_WWW_PATH {
|
location / {
|
||||||
|
alias /var/www/cagette_app/www/;
|
||||||
|
|
||||||
# Path to source
|
# Default indexes and catch-all
|
||||||
alias YNH_WWW_ALIAS ;
|
index index.html index.php;
|
||||||
|
try_files $uri $uri/ /index.php?$args;
|
||||||
|
|
||||||
# Example PHP configuration (remove if not used)
|
# Prevent useless logs
|
||||||
index index.php;
|
location = /favicon.ico {
|
||||||
|
log_not_found off;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
location = /robots.txt {
|
||||||
|
allow all;
|
||||||
|
log_not_found off;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
# Common parameter to increase upload size limit in conjuction with dedicated php-fpm file
|
# Deny access to hidden files and directories
|
||||||
#client_max_body_size 50M;
|
location ~ ^/(.+/|)\.(?!well-known\/) {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
try_files $uri $uri/ index.php;
|
# Execute and serve PHP files
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
fastcgi_pass unix:/var/run/php5-fpm-my_webapp__2.sock;
|
||||||
|
fastcgi_index index.php;
|
||||||
# Filename to be changed if dedicated php-fpm process is required
|
include fastcgi_params;
|
||||||
# This is to be used INSTEAD of line above
|
fastcgi_param REMOTE_USER $remote_user;
|
||||||
# Don't forget to adjust scripts install/upgrade/remove/backup accordingly
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
#
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
#fastcgi_pass unix:/var/run/php5-fpm-YNH_WWW_APP.sock;
|
}
|
||||||
|
|
||||||
fastcgi_index index.php;
|
# Include SSOWAT user panel.
|
||||||
include fastcgi_params;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
fastcgi_param REMOTE_USER $remote_user;
|
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
location ~ \.(png|gif|jpg|ico|swf|css|js|dat)$ {
|
||||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
}
|
||||||
}
|
|
||||||
# PHP configuration end
|
location / {
|
||||||
|
rewrite (.*)/css/[a-z0-9]+/(.*) /css/$2 break;
|
||||||
|
rewrite (.*)/js/[a-z0-9]+/(.*) /js/$2 break;
|
||||||
|
rewrite ^(.*)$ /index.php;
|
||||||
|
}
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue