sudo apt-get update
sudo apt-get install nginx
replace 198.199.103.100 and jgefroh.com
scp -r * [email protected]:/var/www/jgefroh.com
location of nginx config
cd /etc/nginx/
- sites-available: contains individual configuration files for all of your possible static websites.
- sites-enabled: contains links to the configuration files that NGINX will actually read and run.
- Create file inside sites-available
touch default
vim default
- Add the following
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/index.httl; # location of index page
index index.html; # name of the index page
server_name jgefroh.com www.jgefroh.com; | localhost
location / {
try_files $uri $uri/ =404;
}
}