• nginx配置ThinkPHP配置


    配置时注意红色部分

    server {
      listen 8888 default_server;
      #listen [::]:80 default_server;
      server_name _;
      root /usr/share/nginx/html;

      # Load configuration files for the default server block.
      include /etc/nginx/default.d/*.conf;


      location / {
        # root /usr/share/nginx/html;
        index index.html index.htm index.php;
      }

      location ~ .php/?.*$ {
        root /usr/share/nginx/html;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        #加载Nginx默认"服务器环境变量"配置
        include fastcgi.conf;

        #设置PATH_INFO并改写SCRIPT_FILENAME,SCRIPT_NAME服务器环境变量
        set $fastcgi_script_name2 $fastcgi_script_name;
        if ($fastcgi_script_name ~ "^(.+.php)(/.+)$") {
          set $fastcgi_script_name2 $1;
          set $path_info $2;
        }
        fastcgi_param PATH_INFO $path_info;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name2;
        fastcgi_param SCRIPT_NAME $fastcgi_script_name2;
      }


      error_page 404 /404.html;
      location = /40x.html {
      }

      error_page 500 502 503 504 /50x.html;
      location = /50x.html {
      }

    }

  • 相关阅读:
    vue中 根据音频 获取音频的时长
    获取dom位置信息
    react笔记
    Git 基础命令
    vue 笔记
    倒计时
    删留言
    python 类之类变量与实例变量
    python 类的定义
    python 列表推导式
  • 原文地址:https://www.cnblogs.com/shijiaoyun/p/8006725.html
Copyright © 2020-2023  润新知