nginx 默认虚拟主机
nginx 默认虚拟主机
- vim /usr/local/nginx/conf/nginx.conf //增加
include vhost/*.conf; //加在http中 - mkdir /usr/local/nginx/conf/vhost
- cd !$; vim default.conf
- /usr/local/nginx/sbin/nginx -t
- /usr/local/nginx/sbin/nginx -s reload
- curl localhost
- curl -x127.0.0.1:80 123.com