07 Sep 2017
Laravel
location / {
proxy_pass http://127.0.0.1:8300;
proxy_redirect http://127.0.0.1:8300/ /;
proxy_read_timeout 60s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location ~ \.php$ {
proxy_pass http://127.0.0.1:8300;
proxy_redirect http://127.0.0.1:8300/ /;
proxy_read_timeout 60s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
Config
{
"applications": {
"laravel": {
"type": "php 7.0",
"user": "nobody",
"group": "nobody",
"workers": 2,
"root": "/var/www/vhosts/laravel/public",
"script": "index.php",
},
},
"listeners": {
"*:8300": {
"application": "laravel"
}
}
}