nginx配置文件不生效,什么问题?
只是关于dokuwiki的那一段server{}没生效,
先描述下,我是在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配置结束 }
就是注释中的那段没生效...小弟菜鸟还找不到原因在哪儿,请大伙儿指点下
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
手工指定一下document_root试一下。
Nginx的Dokuwiki配置有官方版本的。你可以去看看