准备
- 域名:
mall.com 服务器:
47.116.79.9```basic cd /mydata/nginx/conf [root@iZuf69te1lxhy9no8p7kdeZ conf]# ll total 36 drwxr-xr-x 2 root root 4096 Jan 30 21:21 conf.d -rw-r—r— 1 root root 1007 Jan 31 2017 fastcgi_params -rw-r—r— 1 root root 2837 Jan 31 2017 koi-utf -rw-r—r— 1 root root 2223 Jan 31 2017 koi-win -rw-r—r— 1 root root 3957 Jan 31 2017 mime.types lrwxrwxrwx 1 root root 22 Jan 31 2017 modules -> /usr/lib/nginx/modules -rw-r—r— 1 root root 643 Jan 31 2017 nginx.conf -rw-r—r— 1 root root 636 Jan 31 2017 scgi_params -rw-r—r— 1 root root 664 Jan 31 2017 uwsgi_params -rw-r—r— 1 root root 3610 Jan 31 2017 win-utfvi nginx.conf
upstream mall { server 192.168.56.1:88; //项目所在主机 }
```bash[root@iZuf69te1lxhy9no8p7kdeZ conf]# cd conf.d[root@iZuf69te1lxhy9no8p7kdeZ conf.d]# lltotal 8-rw-r--r-- 1 root root 1097 Jan 31 2017 default.conf##复制一份default.conf并改为mall.conf[root@iZuf69te1lxhy9no8p7kdeZ conf.d]# cp default.conf mall.conf[root@iZuf69te1lxhy9no8p7kdeZ conf.d]# lltotal 8-rw-r--r-- 1 root root 1097 Jan 31 2017 default.conf-rw-r--r-- 1 root root 1067 Jan 30 21:21 mall.conf#修改mall.conf

