Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 1.25 KB

README.md

File metadata and controls

32 lines (25 loc) · 1.25 KB

Webhost

This setup assumes you're using the server through ssh

Debian 11, Ubuntu 22, Ubuntu 20

For a new server go through the following steps:

  1. Create a user, the scripts are made for a 'dev' user, unless a certain reason i suggest just going along with that
  2. Once the dev user is created, sign out of root and ssh back in with the dev user (ssh dev@IP-ADDRESS)
  3. Set up nginx for hosting your websites
  4. Add a domain

Create a dev user

Start with:

curl -s -L https://raw.githubusercontent.com/Storken/webhost-setup/main/install.sh -o install.sh && bash install.sh && rm install.sh

This will ask if you want to create a user and then you'll be prompted for a password and user info.

Set up nginx

Install nginx and set up firewall

curl -s -L https://raw.githubusercontent.com/Storken/webhost-setup/main/install-nginx.sh -o install-nginx.sh && bash install-nginx.sh && rm install-nginx.sh

Add a domain

Create nginx configurations for a new domain and create a directory to add html and other website files.

curl -s -L https://raw.githubusercontent.com/Storken/webhost-setup/main/add-domain.sh -o add-domain.sh && bash add-domain.sh && rm add-domain.sh

After this you can add your website files in /var/www/DOMAIN/html/