Skip to content

Instantly share code, notes, and snippets.

@mbmaciel
Created June 2, 2023 12:00
Show Gist options
  • Save mbmaciel/0298f30f6556afd2f9b50c52cbb37d4f to your computer and use it in GitHub Desktop.
Save mbmaciel/0298f30f6556afd2f9b50c52cbb37d4f to your computer and use it in GitHub Desktop.
Nginx with multiple wordpress sites
// Command to activate
sudo curl -X PUT --data-binary @/home/user/wordpress-multi.config --unix-socket /run/control.unit.sock http://localhost/config
{
"listeners": {
"127.0.0.1:8090": {
"application": "script_index_php"
},
"127.0.0.1:8091": {
"application": "direct_php"
},
"127.0.0.1:8092": {
"application": "script_index_php2"
},
"127.0.0.1:8093": {
"application": "direct_php2"
}
},
"applications": {
"script_index_php": {
"type": "php",
"processes": {
"max": 20,
"spare": 5
},
"user": "www-data",
"group": "www-data",
"root": "/var/www/html",
"script": "index.php"
},
"script_index_php2": {
"type": "php",
"processes": {
"max": 20,
"spare": 5
},
"user": "www-data",
"group": "www-data",
"root": "/var/www/html2",
"script": "index.php"
},
"direct_php": {
"type": "php",
"processes": {
"max": 5,
"spare": 0
},
"user": "www-data",
"group": "www-data",
"root": "/var/www/html",
"index": "index.php"
},
"direct_php2": {
"type": "php",
"processes": {
"max": 5,
"spare": 0
},
"user": "www-data",
"group": "www-data",
"root": "/var/www/html2",
"index": "index.php"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment