Not logged in. · Lost password · Register
Forum: Non-English Discussion Chinese discussion RSS
nginx配置文件不生效,什么问题?
nginx.conf
Avatar
impunk #1
Member since Jul 2011 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: nginx配置文件不生效,什么问题?
我是在windows上测试,web根目录是G:/Server/data/html/

dokuwiki安装在G:/Server/data/html/wiki/

nginx.conf内容:

worker_processes  1;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    client_max_body_size  8m;
    fastcgi_buffer_size  128k;
    fastcgi_buffers  8 128k;
    send_timeout  300;
    fastcgi_connect_timeout  300;
    fastcgi_send_timeout  300;
    fastcgi_read_timeout  300;
    fastcgi_busy_buffers_size  256k;
    fastcgi_temp_file_write_size  256k;
    fastcgi_intercept_errors  on;
    keepalive_timeout  65;

    server_name_in_redirect off;
    server_names_hash_bucket_size 128;

server {
    listen       80;
    server_name  localhost;

location / {
    root   /Server/data/html;
    index  index.html index.htm index.php;
    autoindex on;
    if (!-e $request_filename) {
    rewrite (.*) /?index.php/$1;
    }
    }

location ~ \.php$ {
    root           /Server/data/html;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;
    }

location ~ /\.ht {
    deny  all;
    }
}

#dokuwiki配置开始
server {
        server_name localhost;
        root /Server/data/html;

    location /wiki/(data|conf|bin|inc)/ {
        deny all;
    }

        location /wiki/ {
                index doku.php;
                try_files $uri $uri/ @dokuwiki;
        }

        location @dokuwiki {
                rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
                rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
                rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
                rewrite ^/(.*) /doku.php?id=$1 last;
        }

    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_pass 127.0.0.1:9000;
    }
}
#dokuwiki配置结束
}


注释中关于dokuwiki的配置一个都没生效。纳闷
This post was edited on 2011-07-23, 16:10 by impunk.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-10-15, 16:03:01 (UTC +02:00)