A tiny script to set up a web server. It is important to notice that this script will not set up the web server. Instead, it will implement the necessary configurations so the machine can start working as a web server with any technology that suites your needs. For instance:
- Most of the virtual machine in the market will come just with a
rootuser. This script will create a normal user withsudoprivileges. - This script will set up a connection by
sshkey pairs instead of a password. - This script will save
sshconnection in your~/.ssh/configfile so you can easily connect to the machine. - This script will set up a firewall that will only allow connections to the
80(http),443(https) and a customsshport.
Note
This script is still in progress and will continue improving to add other relevant common configuration tasks.
Before using this tool, ensure that you have:
-
sshinstalled on your system. -
sshaccess to the machine withrootuser. Commands are run from your host machine in the remote machine overssh. -
gitinstalled in the machine that should be set up as a web server.
To install this tool, run the following command:
git clone https://github.com/d3p1/webservify.git && \
chmod +x webservify/src/bin/setup/installer.sh && \
./webservify/src/bin/setup/installer.sh && \
source ~/.bash_profile && \
rm -rf webservify/Using this tool is straightforward:
-
Locally, create a
.webservify_profilefile. This file lets you configure variables that define how to configure the remote machine as a web server. -
Add secure permissions to created
.webservify_profilefile:chmod 400 .webservify_profile. -
Locally, execute
webservify configureto configure the remote machine.
Note
To gain a deeper understanding of how this tool works under the hood, visit the wiki page (currently, in progress).
Note
If you encounter issues while using this tool, refer to the troubleshooting page for guidance (currently, in progress).
Important
Please note that as of now, this tool has only been tested on Debian 12 and requires an environment with bash to function correctly.
Detailed changes for each release are documented in CHANGELOG.md.
This work is published under MIT License.
Always happy to receive a greeting on: