WNMP 项目安装与使用教程
wnmpA solid, portable, no-install Nginx, MySQL, and PHP server for windows项目地址:https://gitcode.com/gh_mirrors/wnmp/wnmp
1. 项目的目录结构及介绍
WNMP 项目的目录结构如下:
wnmp/
├── src/
│   ├── config/
│   ├── scripts/
│   ├── www/
│   ├── wnmp.exe
│   └── ...
├── .gitignore
├── LICENSE
├── README.md
└── ...
src/:包含项目的主要源代码文件。
  config/:存放配置文件的目录。scripts/:存放启动和停止服务的脚本文件。www/:存放网站文件的目录。wnmp.exe:WNMP 的主执行文件。 .gitignore:Git 忽略文件配置。LICENSE:项目许可证文件。README.md:项目说明文档。 
2. 项目的启动文件介绍
WNMP 项目的主要启动文件是 wnmp.exe,位于 src/ 目录下。该文件负责启动 Nginx、MariaDB 和 PHP 服务。
启动步骤如下:
打开命令行工具,进入 src/ 目录。运行 wnmp.exe 文件。 
cd src/
./wnmp.exe
3. 项目的配置文件介绍
WNMP 项目的配置文件主要存放在 src/config/ 目录下,包括 Nginx、MariaDB 和 PHP 的配置文件。
nginx.conf:Nginx 的主配置文件,包含服务器的基本配置信息。my.cnf:MariaDB 的配置文件,包含数据库的基本配置信息。php.ini:PHP 的配置文件,包含 PHP 运行时的配置信息。 
配置文件示例:
nginx.conf
server {
    listen 80;
    server_name localhost;
 
    location / {
        root   html;
        index  index.html index.htm;
    }
 
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }
}
my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
 
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
php.ini
[PHP]
engine = On
short_open_tag = Off
asp_tags = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions =
disable_classes =
zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
default_mimetype = "text/html"
default_charset = "UTF-8"
以上是 WNMP 项目的目录结构、启动文件和配置文件的介绍。希望这份文档能帮助你更好地理解和使用 WNMP 项目。
wnmpA solid, portable, no-install Nginx, MySQL, and PHP server for windows项目地址:https://gitcode.com/gh_mirrors/wnmp/wnmp
 1