w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to configure PhpMyAdmin on NGINX (Windows)
server {
    listen       80;
    server_name  localhost; 

    location / {
        root   C:MHServerwww;
        index  index.php index.html index.htm;
    }

    location = / {
        root   C:MHServerwww;
        index index.php index.html index.htm;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   C:MHServerwww;
    }


    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ .php$ {
        root           C:MHServerwww;
        include fastcgi_params;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        include        fastcgi_params;
    }

    location /Phpmyadmin {
        root C:MHServer;
        index index.php index.html index.htm;
        location ~ ^/Phpmyadmin/(.+.php)$ {
            try_files $uri = 404;
            root C:MHServer;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $request_filename;
            include fastcgi_params;
        }
        location ~*
^/Phpmyadmin/(.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
            root C:MHServer;
        }
    }

    location /phpmyadmin {
        rewrite ^/* /Phpmyadmin last;
    }

}




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.