
PS C:\openresty-1.19.9.1-win64> start nginx
PS C:\openresty-1.19.9.1-win64>


PS C:\openresty-1.19.9.1-win64> tasklist /fi "imagename eq nginx.exe"
映像名称 PID 会话名 会话# 内存使用
========================= ======== ================ =========== ============
nginx.exe 15816 Console 1 7,400 K
nginx.exe 93052 Console 1 11,380 K
nginx.exe 97096 Console 1 8,848 K
nginx.exe 117120 Console 1 9,364 K
PS C:\openresty-1.19.9.1-win64> ./nginx -s stop
PS C:\openresty-1.19.9.1-win64> tasklist /fi "imagename eq nginx.exe"
映像名称 PID 会话名 会话# 内存使用
========================= ======== ================ =========== ============
nginx.exe 15816 Console 1 11,652 K
nginx.exe 114616 Console 1 15,888 K
PS C:\openresty-1.19.9.1-win64>


PS C:\WINDOWS\system32> tasklist /fi "imagename eq nginx.exe"
信息: 没有运行的任务匹配指定标准。
PS C:\WINDOWS\system32> cd ..
PS C:\WINDOWS> cd ..
PS C:\> cd .\openresty-1.19.9.1-win64\
PS C:\openresty-1.19.9.1-win64> tasklist /fi "imagename eq nginx.exe"
信息: 没有运行的任务匹配指定标准。
PS C:\openresty-1.19.9.1-win64> start nginx
PS C:\openresty-1.19.9.1-win64> tasklist /fi "imagename eq nginx.exe"
映像名称 PID 会话名 会话# 内存使用
========================= ======== ================ =========== ============
nginx.exe 12652 Console 1 8,972 K
nginx.exe 17092 Console 1 9,512 K
PS C:\openresty-1.19.9.1-win64> resty -e "ngx.say('Hello, OpenResty!')"
Hello, OpenResty!
PS C:\openresty-1.19.9.1-win64> cd ..
PS C:\> resty -e "ngx.say('Hello, OpenResty!')"
Hello, OpenResty!
PS C:\>

PS C:\openresty-1.19.9.1-win64> nginx -s reload
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in ./conf/nginx.conf:48
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in C:/openresty-1.19.9.1-win64/conf/vhosts/msi-main.conf:14
nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 64
PS C:\openresty-1.19.9.1-win64>

http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 443;
server_name localhost;
client_max_body_size 200m;
client_body_buffer_size 1024k;
fastcgi_read_timeout 180s;
#charset koi8-r;
#access_log logs/host.access.log main;
ssl on;
ssl_certificate localhost.pem;
ssl_certificate_key localhost-key.pem;
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
server_names_hash_max_size 1024;
server_names_hash_bucket_size 128;
server {
listen 443 ssl;
server_name localhost;
client_max_body_size 200m;
client_body_buffer_size 1024k;
fastcgi_read_timeout 180s;
#charset koi8-r;
#access_log logs/host.access.log main;
ssl_certificate localhost.pem;
ssl_certificate_key localhost-key.pem;
location / {
root E:/wwwroot;
index index.html index.htm index.php;
}
#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;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
root E:/wwwroot;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
include C:/openresty-1.19.9.1-win64/conf/vhosts/*.conf;
## PHP-FPM Servers ##
upstream php-fpm {
server 127.0.0.1:9000;
}
}
PS C:\openresty-1.19.9.1-win64> nginx -s reload
PS C:\openresty-1.19.9.1-win64> resty -e "ngx.say('Hello, OpenResty!')"
Hello, OpenResty!
PS C:\openresty-1.19.9.1-win64>
PS C:\WINDOWS\system32> cd ..
PS C:\WINDOWS> cd ..
PS C:\> start nginx
PS C:\> php-cgi.exe -b 127.0.0.1:9000-c C:/php-7.4.6/php.ini
PS C:\> nginx -s reload
nginx: [alert] could not open error log file: CreateFile() "./logs/error.log" failed (3: The system cannot find the path specified)
2021/09/17 19:04:54 [emerg] 3708#3712: CreateFile() "./conf/nginx.conf" failed (3: The system cannot find the path specified)
PS C:\> cd .\openresty-1.19.9.1-win64\
PS C:\openresty-1.19.9.1-win64> nginx -s reload
nginx: [error] CreateFile() "./logs/nginx.pid" failed (2: The system cannot find the file specified)
PS C:\openresty-1.19.9.1-win64> tasklist /fi "imagename eq nginx.exe"
信息: 没有运行的任务匹配指定标准。
PS C:\openresty-1.19.9.1-win64> start nginx
PS C:\openresty-1.19.9.1-win64> tasklist /fi "imagename eq nginx.exe"
映像名称 PID 会话名 会话# 内存使用
========================= ======== ================ =========== ============
nginx.exe 3712 Console 1 18,068 K
nginx.exe 13172 Console 1 18,560 K
PS C:\openresty-1.19.9.1-win64> nginx -s reload
PS C:\openresty-1.19.9.1-win64>

server {
listen 443 ssl;
server_name morefunresty.dev.chinamcloud.cn;
charset utf-8;
lua_need_request_body on;
access_log logs/morefunresty.dev.chinamcloud.cn.access.log;
error_log logs/morefunresty.dev.chinamcloud.cn.error.log;
ssl_certificate vhosts/morefunresty.dev.chinamcloud.cn.pem;
ssl_certificate_key vhosts/morefunresty.dev.chinamcloud.cn-key.pem;
location / {
if ($request_method = OPTIONS ) {
add_header Content-Length 0;
add_header Content-Type text/plain;
return 200;
}
}
location ~ ^/lua/api/vote/([-_a-zA-Z0-9/]+) {
default_type application/json;
access_by_lua_file E:/wwwroot/msi_main/resty/app/common/boot/bootstrap.lua;
content_by_lua_file E:/wwwroot/msi_main/resty/app/mods/vote/$1.lua;
}
location ~ ^/lua/api/poll/([-_a-zA-Z0-9/]+) {
default_type application/json;
access_by_lua_file E:/wwwroot/msi_main/resty/app/common/boot/bootstrap.lua;
content_by_lua_file E:/wwwroot/msi_main/resty/app/mods/poll/$1.lua;
}
location ~ ^/lua/api/draw/([-_a-zA-Z0-9]+) {
default_type application/json;
access_by_lua_file E:/wwwroot/msi_main/resty/app/common/boot/bootstrap.lua;
content_by_lua_file E:/wwwroot/msi_main/resty/app/mods/draw/$1.lua;
}
location /draw/times {
internal;
content_by_lua_file E:/wwwroot/msi_main/resty/app/mods/draw/times_check.lua;
}
}

需要长期技术维护或远程问题排查?
我是拥有 15+ 年经验的 PHP / Go 后端工程师,长期关注已有系统维护、Bug 修复、性能优化、服务器排查、WordPress 网站维护和小功能迭代。
如果你的项目遇到以下情况,可以先从一次小问题排查开始合作:
- ✅ PHP / Laravel / Yii2 老项目无人维护
- ✅ Go / Gin 后端接口需要排查或优化
- ✅ WordPress 网站访问慢、报错或插件冲突
- ✅ Nginx / MySQL / Redis / Linux 服务器异常
- ✅ CDN / Cloudflare / DNS / HTTPS 配置问题
- ✅ 需要长期远程技术支持或兼职维护
更多介绍请查看:关于我 & 合作
微信:13980074657
邮箱:shuijingwanwq@gmail.com
Telegram:@shuijingwan
GitHub:https://github.com/shuijingwan

发表回复