服务器地址怎么修改不成功,永久链接设置 无法开启地址重写功能 "重写功能检测失败, 请检查你的服务器设置"...

环境: 内核 debian 4.9 rc8 x64, docker容器 alpine 3.4, nginx 1.10.1, php 5.6.29, sqlite 3.13.0

nginx.conf 内容:

# run nginx in foreground

daemon off;

error_log /data/logs/nginx/nginx-error.log error;

pid /var/run/nginx.pid;

worker_processesauto;

events {

worker_connections1024;

}

http {

sendfileon;

include/etc/nginx/mime.types;

include/etc/nginx/fastcgi.conf;

default_typeapplication/octet-stream;

tcp_nopushon;

client_body_temp_path /tmp/nginx/body 1 2;

fastcgi_temp_path /tmp/nginx/fastcgi_temp 1 2;

client_max_body_size 2G;

server {

listen80;

root/data/www;

indexindex.php index.html index.htm;

location = /robots.txt {

allow all;

log_not_found off;

access_log off;

}

# deny dot-files

location ~ /\. {

deny all;

access_log off;

log_not_found off;

}

if (!-e $request_filename) {

rewrite ^(.*)$ /index.php$1 last;

}

location / {

if (-f $request_filename/index.html) {

rewrite (.*) $1/index.html break;

}

if (-f $request_filename/index.php){

rewrite (.*) $1/index.php;

}

if (!-f $request_filename) {

rewrite (.*) /index.php;

}

}

location ~ .*\.php(\/.*)*$ {

include fastcgi.conf;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

include fastcgi_params;

set $path_info "";

set $real_script_name $fastcgi_script_name;

if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {

set $real_script_name $1;

set $path_info $2;

}

fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;

fastcgi_param SCRIPT_NAME $real_script_name;

fastcgi_param PATH_INFO $path_info;

}

}

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值