Last active
August 29, 2015 14:20
-
-
Save denis-shvets/68891a4774de9382009e to your computer and use it in GitHub Desktop.
Ubuntu: Static nginx config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo nano /etc/nginx/sites-available/sitename | |
server { | |
include /home/username/www/sitename/nginx.conf; | |
} | |
# sudo ln /etc/nginx/sites-available/sitename /etc/nginx/sites-enabled/sitename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo nano /home/username/www/sitename/nginx.conf | |
listen 80; | |
root /home/username/www/sitename/dist; | |
index index.html index.htm; | |
server_name sitename; | |
location / { | |
try_files $uri $uri/ $uri.html =404; | |
} | |
# sudo service nginx restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment