ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

nginx虚拟目录配置+重定向

2020-07-30 20:32:23  阅读:39  来源: 互联网

标签:index .+ 重定向 虚拟目录 share nginx php fastcgi


  location /php/ {
    alias /usr/share/nginx/php/;
    index index.html index.htm index.php;
    if (!-e $request_filename) {
        rewrite  ^/php/(.*)$  /php/index.php?s=/$1  last;
    }
  }

  location ~ ^/php/.+\.php$ {
    fastcgi_pass 127.0.0.1:9000;
    include fastcgi_params;
    root /usr/share/nginx/;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_param SCRIPT_FILENAME  /usr/share/nginx$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_index index.php;
  }

标签:index,.+,重定向,虚拟目录,share,nginx,php,fastcgi
来源: https://www.cnblogs.com/lantor/p/13406148.html

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有