0

私はあきらめます...私がurllocalhost/ pma /と入力したときに、html / pmaフォルダーでinedx.phpを開くようにnginxを構成するにはどうすればよいですか?

localhost / pma / index.phpと入力すると、機能します。私はウィンドウズに取り組んでいます。

私の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;
        }

    }
}
4

1 に答える 1

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;
        }

    }
}
于 2013-01-21T19:21:10.687 に答える