Skip to content

Instantly share code, notes, and snippets.

@jsilverdev
Last active April 10, 2024 16:34
Show Gist options
  • Save jsilverdev/1ab4cc6a4bb8e46ab8c8c3b3da085007 to your computer and use it in GitHub Desktop.
Save jsilverdev/1ab4cc6a4bb8e46ab8c8c3b3da085007 to your computer and use it in GitHub Desktop.
Ngnix UNIT Laravel Config
{
"settings" :{
"http":{
"max_body_size": 135266304
}
},
"listeners": {
"*:80": {
"pass": "routes"
}
},
"routes": [
{
"match": {
"uri": "!/index.php"
},
"action": {
"share": "/path/to/app/public$uri",
"fallback": {
"pass": "applications/laravel"
}
}
}
],
"applications": {
"laravel": {
"type": "php",
"root": "/path/to/app/public/",
"script": "index.php",
"user": "your_user",
"group": "your_user",
"options" : {
"admin" : {
"post_max_size": "129M",
"upload_max_filesize" : "129M"
}
}
}
}
}
{
"listeners": {
"*:80": {
"pass": "routes/app1"
},
"*:8081": {
"pass": "routes/app2"
},
"*:8082": {
"pass": "routes/app3"
}
},
"routes": {
"app1": [
{
"match": {
"uri": "!/index.php"
},
"action": {
"share": "/path/to/app1/public$uri",
"fallback": {
"pass": "applications/app1"
}
}
}
],
"app2": [
{
"match": {
"uri": "!/index.php"
},
"action": {
"share": "/path/to/app2/public$uri",
"fallback": {
"pass": "applications/app2"
}
}
}
],
"app3": [
{
"match": {
"uri": "!/index.php"
},
"action": {
"share": "/path/to/app3/public$uri",
"fallback": {
"pass": "applications/app3"
}
}
}
]
},
"applications": {
"app1": {
"type": "php",
"root": "/path/to/app1/public/",
"script": "index.php",
"user": "your_user",
"group": "your_user"
},
"app2": {
"type": "php",
"root": "/path/to/app2/public/",
"script": "index.php",
"user": "your_user",
"group": "your_user"
},
"app3": {
"type": "php",
"root": "/path/to/app3/public/",
"script": "index.php",
"user": "your_user",
"group": "your_user"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment