当前位置 主页 > 服务器问题 > Linux/apache问题 >

    Nginx0.5.33+PHP5.2.5(FastCGI)搭建胜过Apache10倍的Web服务器(6)

    栏目:Linux/apache问题 时间:2018-11-07 14:17


      (1)、修改/usr/local/webserver/nginx/conf/nginx.conf配置文件后,请执行以下命令检查配置文件是否正确:
    /usr/local/webserver/nginx/sbin/nginx -t
      如果屏幕显示以下两行信息,说明配置文件正确:
      the configuration file /usr/local/webserver/nginx/conf/nginx.conf syntax is ok
      the configuration file /usr/local/webserver/nginx/conf/nginx.conf was tested successfully
      (2)、这时,输入以下命令查看Nginx主进程号:
    ps -ef | grep "nginx: master process" | grep -v "grep" | awk -F ' ' '{print $2}'
      屏幕显示的即为Nginx主进程号,例如:
      6302
      这时,执行以下命令即可使修改过的Nginx配置文件生效:
    kill -HUP 6302