博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Nginx运行Laravel的配置
阅读量:4106 次
发布时间:2019-05-25

本文共 841 字,大约阅读时间需要 2 分钟。

配置文件改成这样

server {        listen  80;  		server_name sub.domain.com;  		set $root_path '/srv/www/default';  		root $root_path;  	  		index index.php index.html index.htm;  	  		try_files $uri $uri/ @rewrite;  	  		location @rewrite {  			rewrite ^/(.*)$ /index.php?_url=/$1;  		}  	  		location ~ \.php {  	  			fastcgi_pass 127.0.0.1:9000;  			fastcgi_index /index.php;  	  			fastcgi_split_path_info       ^(.+\.php)(/.+)$;  			fastcgi_param PATH_INFO       $fastcgi_path_info;  			fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;  			fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;  			include                       fastcgi_params;		}  	  		location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {  			root $root_path;  		}  	  		location ~ /\.ht {  			deny all;  		}      }

在CentOS7.1+Nginx1.8.0+Laravel5.0测试通过

转载地址:http://wspsi.baihongyu.com/

你可能感兴趣的文章
当你无聊时,可以玩玩 GitHub 上这个开源项目...
查看>>
B 站爆红的数学视频,竟是用这个 Python 开源项目做的!
查看>>
安利 10 个让你爽到爆的 IDEA 必备插件!
查看>>
自学编程的八大误区!克服它!
查看>>
GitHub 上的一个开源项目,可快速生成一款属于自己的手写字体!
查看>>
早知道这些免费 API,我就可以不用到处爬数据了!
查看>>
Java各种集合类的合并(数组、List、Set、Map)
查看>>
Mysql复制表以及复制数据库
查看>>
进程管理(一)
查看>>
linux 内核—进程的地址空间(1)
查看>>
存储器管理(二)
查看>>
Android中的Binder(二)
查看>>
Framework之View的工作原理(一)
查看>>
深究Java中的RMI底层原理
查看>>
用idea创建一个maven web项目
查看>>
Kafka
查看>>
9.1 为我们的角色划分权限
查看>>
维吉尼亚之加解密及破解
查看>>
TCP/IP协议三次握手与四次握手流程解析
查看>>
PHP 扩展开发 : 编写一个hello world !
查看>>