Skip to content

A script that automaticly sets up nginx serverblocks with ssl

License

Notifications You must be signed in to change notification settings

bird-dancer/nginx-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

setup-nginx-certbot

A script that automaticly sets up a nginx serverblock or reverse proxy with ssl and the possibility of a git repository being directly hosted on GNU/Linux

what it does:

  • it sets up nginx as a server block or as a reverse proxy
    • for server blocks it generates a folder scructure with a test index.html file
  • if you want to, certbot generates a new new ssl certificate which the script can include in the nginx conf file
  • if wanted, the script manages access to website via .htaccess and a username password combination
  • if you want to, a git repository will be created whose content will be hosted via nginx

dependancies

  • nginx
  • grep
  • certbot (optional - only if you want to generate a ssl certificate)

how to use it:

check if port 80 (even if you just want to set up a https server the domain validation is done via port 80) and port 443 are open

./setup.sh

answer the prompts