Skip to content

在windows上安装mariadb+php+nginx+phpMyAdmin #16

@todaygood

Description

@todaygood

Step1-安装mariadb

写启动脚本

Step2-安装nginx

  1. 修改配置
server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

		access_log  logs/host.access.log;
		
        location =/ {
            root   html;
			#index  baidu.html;
           index  index.html index.htm;
        }
		
		location ^~ /baidu {
            root           html;
            index          baidu.html;
        }
		
		location ~* /phpmyadmin {
            root           html;
			#index          index.php;
            fastcgi_pass   127.0.0.1:9123;
            fastcgi_index  index.php;
            #fastcgi_param  SCRIPT_FILENAME   /scripts$fastcgi_script_name;
			fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
  1. 写启动脚本

Step3-安装php

检查nginx.conf中的 127.0.0.1:9123 端口并没有监听。

location ~* /phpmyadmin {
            root           html;
			#index          index.php;
            fastcgi_pass   127.0.0.1:9123;
            fastcgi_index  index.php;
            #fastcgi_param  SCRIPT_FILENAME   /scripts$fastcgi_script_name;
			fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

安装PHP-FastCGI

https://www.nginx.com/resources/wiki/start/topics/examples/phpfastcgionwindows/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions