1.修改ngnix.conf,增加站点
      server
      {
              listen       80;
              server_name www.****.com;
              index index.html index.htm index.php;
              root /nginx/htdocs/new/;
              error_page 404 http://www.***.com/error.html;
              error_page 500 http://www.***.com/error.html;

              if (-d $request_filename)
              {
                     rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;
              }

              location ~ .*\.php?$
              {
                   include fcgi.conf;
                   fastcgi_pass 127.0.0.1:10080;
                   fastcgi_index index.php;
              }

#              location /log/
#              {
#                  alias /var/log/nginx/;
#                  index err.html;
#              }

              log_format access '$remote_addr - $remote_user [$time_local] "$request" '
                                    '$status $body_bytes_sent "$http_referer" '
                                    '"$http_user_agent" $http_x_forwarded_for';
              access_log /var/log/nginx/nginx_access.log access;
      }
完成后退出。

2.运行/nginx/sbin/nginx -t,检查配置文件是否写对,如成功将返回
9313#0: the configuration file /nginx/conf/nginx.conf syntax is ok
9313#0: the configuration file /nginx/conf/nginx.conf was tested successfully

3.运行ps -ef | grep "nginx: master process" | grep -v "grep" | awk -F ' ' '{print $2}' , 找到nginx的pid

4.最后使用kill -HUP **** (***是nginx的pid),杀掉NGINX的进程,这样一个新的虚似站点就配置完成了。