Hi,
I’d like to have different cake applications under the same domain, which is a cake app too.
I can’t seem to find how to write the Nginx config. Can someone help me?
http://staging.molbio.ch does return the expected result, but
http://staging.molbio.ch/organellar-symposium/pictures returns 404
Here’s my current config:
server {
listen 80;
listen [::]:80;
server_name staging.molbio.ch;
root /var/www/staging/biomol2018/webroot;
rewrite_log on;
access_log /var/log/nginx/staging-molbio-access.log;
error_log /var/log/nginx/staging-molbio-error.log notice;
index index.php index.html;
location / {
allow 10.0.0.0/8;
allow 129.194.0.0/16;
allow 2001:620:600::0/48;
allow fd69:620:600::0/48;
deny all;
try_files $uri $uri/ /index.php?$args;
}
location /organellar-symposium/pictures {
alias /var/www/production/symposiums/pictures/organellar-symposium-2018/webroot;
try_files $uri $uri/ /organellar-symposium/pictures/index.php?$args;
}
add_header Accept-Ranges bytes;
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}