最新版本的lnmp如何开启pathinfo支持,迷茫中
按照论坛的方法修改之后网站一直提示502错误,求教该如何弄呢 添加pathinfo支持,去掉include pathinfo的#,在try_files前加#重启nginx即可使用;502的话可能其他原因,还修改其他配置吗?用的什么程序 老大,添加pathinfo支持,去掉include pathinfo的#,在try_files前加#重启nginx即可使用;我从nginx.conf里面没有看到include pathinfo。我按照你的一个方法修改了pathinfo.conf里面的内容,后来就出现了502错误,如果是新安装的话,nginx.conf里面没有include pathinfo该怎么办呢? 你如果是安装的1.1肯定有,除非修改配置文件去掉了
老大,我重新安装了下,我还是没看到那个Include
这是我的nginx.conf内容userwww www;worker_processes auto;
error_log/home/wwwlogs/nginx_error.logcrit;
pid /usr/local/nginx/logs/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
multi_accept on;
}
http
{
include mime.types;
default_typeapplication/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
gzip on;
gzip_min_length1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE \.";
#limit_conn_zone $binary_remote_addr zone=perip:10m;
##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.
#log format
log_formataccess'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
server
{
listen 80 default;
#listen [::]:80 default ipv6only=on;
server_name www.lnmp.org;
index index.html index.htm index.php;
root/home/wwwroot/default;
location / {
try_files $uri @apache;
}
location @apache {
internal;
proxy_pass http://127.0.0.1:88;
include proxy.conf;
}
location ~ [^/]\.php(/|$)
{
proxy_pass http://127.0.0.1:88;
include proxy.conf;
}
location /nginx_status {
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log/home/wwwlogs/access.logaccess;
}
include vhost/*.conf;
}
你先分清楚你到底用的什么,看配置文件你明显是用的lnmpa
lnmpa是apache处理
现在是前台ng 后台apache
现在是前台ng 后台apache,那该怎么解决呢 lnmpa默认就支持pathinfo,不需要设置,也不需要改什么 可是,我新安装了之后,无法访问xxx.xxx/xxx这样的格式,带上后缀就可以正常了,提示404错误,那是什么问题呢,难道是少安装了什么?
回复 9# 的帖子
pathinfo不都是 http://www.xx.com/pathinfo.php/hi2014 这种的没.php的那是伪静态吧 哦。pathinfo不都是 http://www.xx.com/pathinfo.php/hi2014 这种后面加上.php内容是同样的么。如果是伪静态的话那就要自己写规则了或者不适用ng
页:
[1]