2013-01-21 61 views
0

我放弃...如何配置nginx打开html/pma文件夹中的inedx.php当我输入url localhost/pma /?nginx phpmyadmin 403禁用index.php

当我输入本地主机/ pma/index.php它的工作。 我正在使用windows。

我的nginx的配置:

worker_processes 1; 

events { 
    worker_connections 1024; 
} 

http { 
    include  mime.types; 
    default_type application/octet-stream; 

    sendfile  on; 
    keepalive_timeout 65; 

    server { 
     listen  80; 
     server_name localhost; 

index index.html index.htm index.php; 

     location/{ 
      root html; 
      index index.html index.htm index.php; 
     } 

     location /pma/ { 
      root html/pma; 
      index index.html index.htm index.php; 
     } 

     error_page 500 502 503 504 /50x.html; 
     location = /50x.html { 
      root html; 
     } 

     location ~ \.php$ { 
      include fastcgi.conf; 
      fastcgi_pass 127.0.0.1:9000; 
      fastcgi_index index.php; 
      include fastcgi_params; 
     } 

    } 
} 

回答

0

在IRC上解决了Ray`n: 根必须在服务器,而不是位置。

worker_processes 1; 

events { 
    worker_connections 1024; 
} 

http { 
    include  mime.types; 
    default_type application/octet-stream; 

    sendfile  on; 
    keepalive_timeout 65; 

    server { 
     listen  80; 
     server_name localhost; 

index index.html index.htm index.php; 
root html 

     error_page 500 502 503 504 /50x.html; 
     location = /50x.html { 
      root html; 
     } 

     location ~ \.php$ { 
      include fastcgi.conf; 
      fastcgi_pass 127.0.0.1:9000; 
      fastcgi_index index.php; 
      include fastcgi_params; 
     } 

    } 
}