• 发布PHP项目(nginx+PHP7+mysql 5.6)


    一、环境检查

    1、检查nginx

    ps -ef | grep "nginx"
    

    显示如下内容则代表nginx启动正常

    root 3285 1 0 12:57 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
    

    2、检查防火墙是否开启

      在其他机器上访问服务器80端口,如果可以就代表防火墙已开启。

    二、PHP发布

    1、修改nginx配置文件

    vi nginx.conf  

      找到server修改类似如下内容

    server {
      listen 80;
      server_name foo.com;
     
      root /path;
      index index.html index.htm index.php;
     
      location / {
        try_files $uri $uri/ /index.php$is_args$args;
      }
     
      location ~ /.php$ {
        try_files $uri =404;
     
        include fastcgi.conf;
        fastcgi_pass 127.0.0.1:9000;
      }
    }
    

    2、重启状态配置文件

    /usr/local/nginx/sbin/nginx  -s  reload  #不停止服务重读配置文件
    

      

      



    nginx + PHP7 + mysql 5.6

  • 相关阅读:
    网络编程[28]
    网络编程[30]
    网络编程[20]
    网络编程[29]
    网络编程[19]
    网络编程[15]
    网络编程[12]
    hdu 3802【Ipad,IPhone】
    hdu 2616【Kill the monster】
    hdu 1026【Ignatius and the Princess I】
  • 原文地址:https://www.cnblogs.com/rslai/p/7865831.html
Copyright © 2020-2023  润新知