Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Latest commit

 

History

History

nginx

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Install Nginx

Nginx will act as web server (proxy to Node) and SSL offloader.

You would need:

  • A domain (DNS name like csp.yoursite.com) pointing to the server.

Install

  • Connect to server
ssh ubuntu@xx.xx.xx.xx -i keypair.pem
  • Install Nginx
sudo apt-get install nginx -y
sudo sed -i 's/# server_tokens off;/server_tokens off;/' /etc/nginx/nginx.conf
sudo sh -c "echo 'OK' >> /var/www/html/index.html"
  • (Optional) Get the relevant SSL certificate for the site In fact this kind of site should be https only If so edit the csp-server file accordingly (enable the commented lines)

  • To the get config from repo

wget https://raw.githubusercontent.com/seek-oss/csp-server/master/nginx/csp-server
sudo mv csp-server /etc/nginx/sites-available
sudo ln -s /etc/nginx/sites-available/csp-server /etc/nginx/sites-enabled/csp-server
sudo rm /etc/nginx/sites-enabled/default
sudo service nginx restart
  • Test Nginx
curl http://localhost/