Nginx: One IP, multiple websites, how to configure?
習慣沉默2017-05-16 17:21:47
0
5
788
One IP, multiple websites, how to configure?
ubuntu 14.04 nginx 1.80 php5-fpm
When a website is working normally, when adding another configuration file to sites-available, all of them are inaccessible. Please tell me how to configure it correctly
Configure virtual host:
You can refer to my blog: http://xxgblog.com/2015/05/17/nginx-start/ 4. Virtual host
Each website runs a different port and then reverse-proxyes to each port through the domain name
For example,
abc.com is in 3001
xyz.com is in 3002
nginx runs 80 and reverse proxy to 3001 and 3002 according to the domain name
The idea is here, the specific configuration of the search engine
It is to configure different servers, and then server_name corresponds to the domain name of the website.
A vhost profile can be set up for each website. You can use port 80.
Add vhost