Setting up new sites fast
7 Replies
This probably isn't a thing, honestly. It would prove difficult to set something like this up – especially where each site would have it's own configuration and someone else's configuration will likely not match what you want.
I guess the idea overall would be easy to do, but configuration-wise it wouldn't be feasible.
Thanks,
Dave.
I do that for Centmin Mod and adding Nginx vhosts
I was bored, so wrote a dead basic Debian/Ubuntu based script. Nothing amazing but will get the job done.
Download the file:
wget
make it executable:
chmod +x vhost.sh
Then run the script:
./vhost.sh
Have fun!
- Les
@akerl:
For the record, pumping the results of curl into bash is a terrible plan. In the malicious case, the page could provide something you do not expect (even based on user agent). Even without a malicious actor, an interrupted connection can ruin your day. For instance, if the script says "rm -r /var/lib/coolscript/junk", and the connection dies, you can end up pumping "rm -r /var" into your shell.
- Les
Fair point.