Created
February 12, 2018 13:21
-
-
Save porozhnyy/38e569c5ff15decfbaf0ac65b13ce99a to your computer and use it in GitHub Desktop.
Nginx conf for laravel using unit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"listeners": { | |
"*:8300": { | |
"application": "beauty" | |
} | |
}, | |
"applications": { | |
"beauty": { | |
"type": "php", | |
"processes": 20, | |
"root": "/home/home/Projects/beauty-backend/public", | |
"index": "index.php", | |
"script": "index.php" | |
} | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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