Skip to content

A tiny script to set up a machine as a web server

License

Notifications You must be signed in to change notification settings

d3p1/webservify

[WEBSERVIFY]

semantic-release: angular Release

Introduction

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 root user. This script will create a normal user with sudo privileges.
  • This script will set up a connection by ssh key pairs instead of a password.
  • This script will save ssh connection in your ~/.ssh/config file 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 custom ssh port.

Note

This script is still in progress and will continue improving to add other relevant common configuration tasks.

Prerequisites

Before using this tool, ensure that you have:

  • ssh installed on your system.

  • ssh access to the machine with root user. Commands are run from your host machine in the remote machine over ssh.

  • git installed in the machine that should be set up as a web server.

Installation

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/

Usage

Using this tool is straightforward:

  1. Locally, create a .webservify_profile file. This file lets you configure variables that define how to configure the remote machine as a web server.

  2. Add secure permissions to created .webservify_profile file: chmod 400 .webservify_profile.

  3. Locally, execute webservify configure to 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.

Changelog

Detailed changes for each release are documented in CHANGELOG.md.

License

This work is published under MIT License.

Author

Always happy to receive a greeting on:

About

A tiny script to set up a machine as a web server

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

Languages