I have the following nginx config
server {
listen 80;
client_max_body_size 2M;
server_name some.app;
root /var/virtual/a-cakephp-app/webroot;
access_log /var/log/nginx/a-cakephp-app-access.log;
include common.conf;
include cakephp.conf;
location /billing/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:89;
proxy_redirect off;
rewrite ^/billing/(.*)$ /$1 break;
}
And my webapps are:
/var/virtual/a-cakephp-app
==> virtual path that leads to the cakephp folder (definitely working)
/var/virtual/a-laravel-app
==> virtual path that leads to the laravel folder (not too sure how to test it)
What I want to achieve
I have a cakephp 2 app that is running at http://some.app
. What I want is to start another app running Laravel at http://some.app/billing
My Laravel .env
APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:somekey
APP_URL=http://some.app/billing
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
What did I get
I got a bad gateway error
What did I expect
I was hoping that the laravel app can work without compromising the cakephp app