設置虛擬主機 nginx.conf
linux
34 server{
35 listen 80;
36 server_name www.abc.com;
37 location / {
38 root abc;
39 index index.html;
40 }
41 }
檢測配置文件: /usr/local/nginx/sbin/nginx -t
[root@localhost conf]# /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
重載nginx配置
[root@localhost conf]# /usr/local/nginx/sbin/nginx
[root@localhost conf]# /usr/local/nginx/sbin/nginx -s reload