nginx+apache 下 重写问题
nginx的配置 88端口为apahce服务器
注释掉try_files后 访问 http:// laravel.t2.com/index.php/admin 会出现404错误
查看错误日志:
错误分析是去访问的index.php/admin 目录 所以会报错 不知道原因是什么
server {
listen 80;
server_name laravel.t2.com;
root /home/wwwroot/laravel.t2.com/current/;
index index.php index.html index.htm;
location ~ \.php$ {
proxy_pass http:// 加粗文字laravel.t2.com:88;
include naproxy.conf;
}
location / {
# try_files $uri $uri/ /index.php?$query_string;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 30d;
}
location ~ .*\.(js|css)?$ {
expires 12h;
}
access_log /www/web_logs/laravel.t2.com/access_nginx.log;
error_log /www/web_logs/laravel.t2.com/error_nginx.log;
}
注释掉try_files后 访问 http:// laravel.t2.com/index.php/admin 会出现404错误
查看错误日志:
2016/05/27 16:30:02 [error] 7676#0: *1 open() "/home/wwwroot/laravel.t2.com/current/index.php/admin" failed (20: Not a directory), client: 10.1.5.91, server: laravel.t2.com, request: "GET /index.php/admin HTTP/1.1", host: "laravel.t2.com"
2016/05/27 16:36:19 [error] 7676#0: *2 open() "/home/wwwroot/laravel.t2.com/current/index.php/admin" failed (20: Not a directory), client: 10.1.5.91, server: laravel.t2.com, request: "GET /index.php/admin HTTP/1.1", host: "laravel.t2.com"
错误分析是去访问的index.php/admin 目录 所以会报错 不知道原因是什么
5 个回复
墨小颜
赞同来自:
墨小颜
赞同来自:
墨小颜
赞同来自:
墨小颜
赞同来自:
yal6820
赞同来自: