Skip to content

Simple makefile scripts to set up a linux server with a webhost (nginx)

License

Notifications You must be signed in to change notification settings

chunkydotdev/webhost-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/

About

Simple makefile scripts to set up a linux server with a webhost (nginx)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published