番外篇:ubuntu nginx thinkphp
来源:互联网 发布:mac 删除输入法记忆 编辑:程序博客网 时间:2024/05/01 14:10
之前一直在Apache服务器上使用thinkphp,这几天把项目放到了nginx服务器上之后,发现thinkphp的pathinfo出现了问题,需要对vhost(/etc/nginx/site-enable/目录下的文件)文件进行修改,这里贴出我自己的配置文件,主要修改了location ~ \.php${}
之间的代码
server { listen 9080 default_server; listen [::]:9080 default_server; root /var/www/html; index index.html index.htm index.nginx-debian.html index.php; server_name _; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } location ~ \.php/?.*$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.0-fpm.sock; include fastcgi.conf; 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; }}
0 0
- 番外篇:ubuntu nginx thinkphp
- nginx thinkphp
- thinkphp nginx 支持rewrite
- nginx 支持 ThinkPHP
- nginx配置ThinkPHP Rewrite
- 解决Nginx部署ThinkPHP
- nginx thinkphp路由支持
- NGINX 配置Thinkphp
- nginx Thinkphp rewrite
- thinkphp nginx下配置文件
- 部署NGINX+PHP+Thinkphp
- thinkphp nginx 404错误
- NGINX+THINKPHP配置注意
- nginx,thinkphp配置
- nginx支持thinkphp
- 配置Nginx支持ThinkPHP
- thinkphp nginx配置文件
- nginx 支持thinkphp设置
- 设置eclipse在新建了一个jsp文件之后将字符编码自动设为utf-8字符编码
- Apache (httpd服务)常见的服务器故障整理及解决方法
- POJ 2524 Ubiquitous Religions
- Spring 框架参考文档(三)之Aspect Oriented Programming with Spring Prev
- MAC Spark no snappyjava in java.library.path
- 番外篇:ubuntu nginx thinkphp
- 802.11g组帧方式以及物理层收发过程简介
- linux常用命令的常用使用方法---ps
- Redis的复制(Master/Slave)
- 在PHP中判断一个变量是否为整数
- maven的一些简单介绍
- 应对巨头需要的是战略的高瞻远瞩,而不是战术上的996——读《腾讯传》有感
- 单片机实验期末考试-使用两个外部中断控制8只LED显示的电路
- 安卓群英传 _个人笔记