Hello,
Good news. Now with this script you can almost do everything
. As people asked before we have new options, setting php-fpm and setting virtual host. "Small" extra, you can even remove vhosts. This script will help you, but I'm not sure if you will learn all about Hiawatha web server and power you can get.
This script version is 0.2. Tested by few people and working without issues. I look for better solution for few things but that will come in the future. For now you have all what you need to start hosting your site with Hiawatha. Many options can be set thanks to bash, but one day i will have some limits. I have few ideas but i need to learn how to code that parts and maybe i will need more time to add some extra futures.
Problem is not coding it's logic inside code. When you are done with one part you move to next, then you see that you need more variables
. Then you need to re-code things to work together.
Now back to script. When you set your vhost your can check inside /etc/hiawatha/hiawatha.conf file your new vhost setting. In this time you can't re-edit Hiawatha settings via bash, but if all goes well that can be done as well.
External image via http://s15.postimg.org/86mte6g3v/capture7.jpg
This is how new vhost code will look:External image via http://s17.postimg.org/vky250sr3/capture8.jpg
What we have here, standard vhost with php-fpm enabled (fast-cgi will do the job for HTML pages, don't worry). But if you have site with a lot of download links you need to set your own time for active connection.
TimeForCGI = 5If this is you case you can replace 5 with 1800 (30min). As i don't want people to download things from my server, i don't need more then 5sec for normal connection. I will put this option to 10 sec after writing this topic, but you must keep this on your mind. It's not my fault if something goes wrong.
Next step ... i will add some cool stuff and new part for this script and that is what people asked as well. First option will be setting your SSH port, setting Hiawatha port, setting XSS and SQLi protection, setting anti DOS protection and things like that.
And in the end ...thanks to my friends from Back Box community and my new net dudes from IRC freenode channel #filmsbykris, cool people with coding knowledge.
Gits link:
https://gist.github.com/ZEROF/10743343Cheers !