Guangning Yu's Blog
Home
Code
Data
Setup
Industry
MachineLearning
Archive
Setup Nginx on Ubuntu 14.04
2018-11-21 10:00:54
- start `nginx` service ``` sudo service apache2 stop sudo service nginx start sudo service nginx status ``` - restart `nginx` when the server is rebooted ``` sudo update-rc.d nginx defaults ``` - config reverse proxy ``` sudo vi /etc/nginx/conf.d/custom.conf ``` ``` server { server_name blog.guangningyu.com; location / { proxy_pass http://localhost:9000/; } } server { server_name guangningyu.com *.guangningyu.com; location / { proxy_pass http://localhost:4000/; } } ``` ``` sudo nginx -t sudo nginx -s reload ```
Previous:
Lodash Basics
Next:
Bash Basics