Question

I can't figure out this php script

Posted December 6, 2016 1.7k views
Nginx PHP Deployment Ubuntu 16.04

Hello!

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:
https://gist.github.com/SpellCraft/f581b2ed178594d60a9cfd5133692c62

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

this is config for nginx !!!
or what

hi,
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.

Submit an Answer