Skip to content

Instantly share code, notes, and snippets.

@porozhnyy
Created February 12, 2018 13:21
Show Gist options
  • Save porozhnyy/38e569c5ff15decfbaf0ac65b13ce99a to your computer and use it in GitHub Desktop.
Save porozhnyy/38e569c5ff15decfbaf0ac65b13ce99a to your computer and use it in GitHub Desktop.
Nginx conf for laravel using unit
{
"listeners": {
"*:8300": {
"application": "beauty"
}
},
"applications": {
"beauty": {
"type": "php",
"processes": 20,
"root": "/home/home/Projects/beauty-backend/public",
"index": "index.php",
"script": "index.php"
}
}
}
server {
listen 80;
server_name beauty.local;
root /home/home/Projects/beauty-backend/public;
index index.php;
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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment