博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Just for fun——windows上bat管理你的Nginx+PHP+MySQL
阅读量:6908 次
发布时间:2019-06-27

本文共 1857 字,大约阅读时间需要 6 分钟。

文件目录结构

clipboard.png

  • start_nginx.bat为开启nginx的脚本
  • start_php_fpm.bat为开启php-fpm的脚本
  • start_mysql.bat为开启mysql服务的脚本
  • start.bat为开启上述所有进程的脚本
  • stop.bat为关闭所有进程的脚本

如果你更喜欢GUI程序,可以使用

简单使用手册

***********Author Salamander**************1. 把nginx,mysql,php压缩包解压,并命名为nginx,mysql,php7(标识一下新版本而已),以下配置文件用utf-8修改(sublime即可)2. php目录中把php.ini-development(或者php.ini-production)改为php.ini,修改extension_dir配置,注意去掉分号(;)分号表示注释,另外把一些扩展也加载进来(去掉前面分号即可)**********************************************extension=php_bz2.dllextension=php_curl.dllextension=php_fileinfo.dllextension=php_ftp.dllextension=php_gd2.dllextension=php_gettext.dll; Directory in which the loadable extensions (modules) reside.; http://php.net/extension-dir; extension_dir = "./"; On windows:extension_dir = "D:/nmp/php7/ext"**********************************************启动php-cgi可以双击start_php_fpm.bat即可3.进入nginx中conf目录,打开nginx.conf文件找到server段(配置localhost虚拟主机)*************************************************************    server {        listen       80;        server_name  localhost;        root D:/web_root;        index  index.php index.html index.htm;        #charset koi8-r;        #access_log  logs/host.access.log  main;        #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   html;        }        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000        #        location ~ \.php$ {            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;            include        fastcgi_params;        }    }*************************************************************这个server的根目录为D盘下web_root,index第一个为index.php你需要D盘新建web_root文件夹,再在web_root中新建文件index.php,写入

转载地址:http://qhfcl.baihongyu.com/

你可能感兴趣的文章
[PHP] 网盘搜索引擎-采集爬取百度网盘分享文件实现网盘搜索(二)
查看>>
OCP学习基本知识点总结
查看>>
HDU1009_FatMouse' Trade【贪心】【水题】
查看>>
iOS NSMutableDictionary中UIImage的存储和读取
查看>>
二叉堆
查看>>
使用cssQuery选择器语法来查找元素
查看>>
Linux IPC实践(7) --Posix消息队列
查看>>
使用python创建cocos2d-x项目
查看>>
上网管理 一些主流的视频网站
查看>>
python -- 字符串和编码
查看>>
Java中的Enum的继承
查看>>
[Android]RecyclerView的简单演示样例
查看>>
怎样在Java中运行Hive命令或HiveQL
查看>>
使用enca进行字符集转码
查看>>
Ubuntu下安装Oracle JRE运行环境
查看>>
Go语言标准包之用io包模拟curl
查看>>
Bootstrap输入框组
查看>>
Linux下使用tcpdump进行抓包(转)
查看>>
docker 标记和推送镜像
查看>>
在弱网传输的情况下,是怎么做到节约流量的(面试小问题,Android篇)
查看>>