I can't figure out this php script

December 6, 2016 1.6k views
Deployment Nginx PHP Ubuntu 16.04


A friend of mine setup the droplet I currently have and gave me a script so I could easily manage vhosts, its been a long time since I’ve done any of this and my friend has since passed in a car accident so I can’t ask him for help.

The script:

I can’t figure out how to use the script or how it works (beyond setting up a ngnix vhost)

I’d appreciate any help!

2 Answers

this is config for nginx !!!
or what

this a script that creates sub-domain & nginx server block for that automatically.

for example, you have an application that need separate server block & directory for each user/subscriber. if you have that script, you dont need to create server bocks for each users manually. it will automatically create a sub-domain, a root directory for that, a server block and symlink that server block to yours sites-enabled. just you need to run that script/ bash upon user registration.

Have another answer? Share your knowledge.