怎样让nginx支持pathinfo模式?下面是我的配置文件

server {
   listen 80;

   root /var/www/html/dms/public;
   index index.php index.html index.htm index.nginx-debian.html;

   server_name www.abc.com;

   location / {

       try_files $uri $uri/ /index.php?$query_string;
   }


   location ~ \.php$ {
       include snippets/fastcgi-php.conf;
       fastcgi_pass unix:/run/php/php7.0-fpm.sock;
   }

   location ~ /\.ht {
       deny all;
   }
}
阅读 2.6k
3 个回答

这里有个现成的,照这个写的试试看。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题