mirror of
https://github.com/YunoHost-Apps/phpback_ynh.git
synced 2024-09-03 19:56:34 +02:00
Fix Nginx configuration
The rewrite -> index.php last is required for urls like https://mydomain/phpback/home/feedback, mydomain/admin/ etc. The location public, favicon.ico is required to prevent rewriting those urls.
This commit is contained in:
parent
79cc48debb
commit
5de95e3180
1 changed files with 6 additions and 4 deletions
|
@ -1,15 +1,17 @@
|
|||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
|
||||
# Path to source
|
||||
alias __FINALPATH__/;
|
||||
|
||||
index index.php;
|
||||
|
||||
try_files $uri $uri/ index.php;
|
||||
location __FINALPATH__/public {}
|
||||
location __FINALPATH__/favicon.ico {}
|
||||
rewrite ^(.*)$ __FINALPATH__/index.php last;
|
||||
|
||||
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
||||
#client_max_body_size 50M;
|
||||
|
||||
try_files $uri $uri/ index.php;
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
|
|
Loading…
Add table
Reference in a new issue