
server {
listen 80; ## listen for ipv4
server_name CHANNEL_PUB_API_CFG_NGINX_SERVER_NAME;
charset utf-8;
root /sobey/www/channel-pub-api;
index index.php;
location / {
root /sobey/www/channel-pub-api/api/web;
try_files $uri $uri/ /api/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/assets/.+\.php(/|$) {
deny all;
}
}
location /qq {
alias /sobey/www/channel-pub-api/qq/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /qq/ {
# return 301 /qq;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /qq {
# if your location is "/qq", try use "/qq/qq/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /qq/qq/web/index.php$is_args$args;
}
# if your location is "/qq", try use "/qq/qq/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /qq/qq/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/qq/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/qq/assets/.+\.php(/|$) {
deny all;
}
}
location /weibo {
alias /sobey/www/channel-pub-api/weibo/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /weibo/ {
# return 301 /weibo;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /weibo {
# if your location is "/weibo", try use "/weibo/weibo/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /weibo/weibo/web/index.php$is_args$args;
}
# if your location is "/weibo", try use "/weibo/weibo/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /weibo/weibo/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/weibo/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/weibo/assets/.+\.php(/|$) {
deny all;
}
}
location /wx {
alias /sobey/www/channel-pub-api/wx/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /wx/ {
# return 301 /wx;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /wx {
# if your location is "/wx", try use "/wx/wx/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /wx/wx/web/index.php$is_args$args;
}
# if your location is "/wx", try use "/wx/wx/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /wx/wx/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/wx/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/wx/assets/.+\.php(/|$) {
deny all;
}
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ ^/.+\.php(/|$) {
rewrite (?!^/((api|qq|weibo|wx)/web|qq|weibo|wx))^ /api/web$uri break;
rewrite (?!^/qq/web)^/qq(/.+)$ /qq/web$1 break;
rewrite (?!^/weibo/web)^/weibo(/.+)$ /weibo/web$1 break;
rewrite (?!^/wx/web)^/wx(/.+)$ /wx/web$1 break;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $fastcgi_script_name =404;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\. {
deny all;
}
}

企鹅号:https://wjdev2.chinamcloud.com:8661/v1/qq/
微信公众帐号:https://wjdev2.chinamcloud.com:8661/v1/wx/
微博:https://wjdev2.chinamcloud.com:8661/v1/weibo/
跨渠道:https://wjdev2.chinamcloud.com:8661/v1/
server {
listen CHANNEL_PUB_API_CFG_NGINX_AUTH_LISTEN; ## listen for ipv4
server_name CHANNEL_PUB_API_CFG_NGINX_AUTH_SERVER_NAME;
charset utf-8;
root /sobey/www/channel-pub-api/frontend/web;
index index.php;
location / {
# 如果找不到真实存在的文件,把请求分发至 index.php
try_files $uri $uri/ /index.php$is_args$args;
}
# uncomment to avoid processing of calls to non-existing static files by Yii
#location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
# try_files $uri =404;
#}
#error_page 404 /404.html;
# deny accessing php files for the /assets directory
location ~ ^/assets/.*\.php$ {
deny all;
}
# 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;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~* /\. {
deny all;
}
}
server {
listen CHANNEL_PUB_API_CFG_NGINX_API_LISTEN; ## listen for ipv4
server_name CHANNEL_PUB_API_CFG_NGINX_API_SERVER_NAME;
charset utf-8;
root /sobey/www/channel-pub-api;
index index.php;
location / {
root /sobey/www/channel-pub-api/api/web;
try_files $uri $uri/ /api/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/assets/.+\.php(/|$) {
deny all;
}
}
location /qq {
alias /sobey/www/channel-pub-api/qq/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /qq/ {
# return 301 /qq;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /qq {
# if your location is "/qq", try use "/qq/qq/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /qq/qq/web/index.php$is_args$args;
}
# if your location is "/qq", try use "/qq/qq/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /qq/qq/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/qq/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/qq/assets/.+\.php(/|$) {
deny all;
}
}
location /weibo {
alias /sobey/www/channel-pub-api/weibo/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /weibo/ {
# return 301 /weibo;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /weibo {
# if your location is "/weibo", try use "/weibo/weibo/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /weibo/weibo/web/index.php$is_args$args;
}
# if your location is "/weibo", try use "/weibo/weibo/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /weibo/weibo/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/weibo/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/weibo/assets/.+\.php(/|$) {
deny all;
}
}
location /wx {
alias /sobey/www/channel-pub-api/wx/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /wx/ {
# return 301 /wx;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /wx {
# if your location is "/wx", try use "/wx/wx/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /wx/wx/web/index.php$is_args$args;
}
# if your location is "/wx", try use "/wx/wx/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /wx/wx/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/wx/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/wx/assets/.+\.php(/|$) {
deny all;
}
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ ^/.+\.php(/|$) {
rewrite (?!^/((api|qq|weibo|wx)/web|qq|weibo|wx))^ /api/web$uri break;
rewrite (?!^/qq/web)^/qq(/.+)$ /qq/web$1 break;
rewrite (?!^/weibo/web)^/weibo(/.+)$ /weibo/web$1 break;
rewrite (?!^/wx/web)^/wx(/.+)$ /wx/web$1 break;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $fastcgi_script_name =404;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\. {
deny all;
}
}

CHANNEL_PUB_API_CFG_NGINX_API_SERVER_NAME=wjdev2.chinamcloud.com # Nginx 服务器名称(接口域名、建议入方向仅支持内网)
CHANNEL_PUB_API_CFG_NGINX_API_LISTEN=80 # Nginx 服务器监听端口(接口域名、建议入方向仅支持内网)
CHANNEL_PUB_API_CFG_NGINX_AUTH_SERVER_NAME=wjdev2.chinamcloud.com # Nginx 服务器名称(授权域名、建议入方向可支持外网)
CHANNEL_PUB_API_CFG_NGINX_AUTH_LISTEN=81 # Nginx 服务器监听端口(授权域名、建议入方向可支持外网)
server {
listen 81; ## listen for ipv4
server_name wjdev2.chinamcloud.com;
charset utf-8;
root /sobey/www/channel-pub-api/frontend/web;
index index.php;
location / {
# 如果找不到真实存在的文件,把请求分发至 index.php
try_files $uri $uri/ /index.php$is_args$args;
}
# uncomment to avoid processing of calls to non-existing static files by Yii
#location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
# try_files $uri =404;
#}
#error_page 404 /404.html;
# deny accessing php files for the /assets directory
location ~ ^/assets/.*\.php$ {
deny all;
}
# 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;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~* /\. {
deny all;
}
}
server {
listen 80; ## listen for ipv4
server_name wjdev2.chinamcloud.com;
charset utf-8;
root /sobey/www/channel-pub-api;
index index.php;
location / {
root /sobey/www/channel-pub-api/api/web;
try_files $uri $uri/ /api/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/assets/.+\.php(/|$) {
deny all;
}
}
location /qq {
alias /sobey/www/channel-pub-api/qq/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /qq/ {
# return 301 /qq;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /qq {
# if your location is "/qq", try use "/qq/qq/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /qq/qq/web/index.php$is_args$args;
}
# if your location is "/qq", try use "/qq/qq/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /qq/qq/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/qq/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/qq/assets/.+\.php(/|$) {
deny all;
}
}
location /weibo {
alias /sobey/www/channel-pub-api/weibo/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /weibo/ {
# return 301 /weibo;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /weibo {
# if your location is "/weibo", try use "/weibo/weibo/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /weibo/weibo/web/index.php$is_args$args;
}
# if your location is "/weibo", try use "/weibo/weibo/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /weibo/weibo/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/weibo/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/weibo/assets/.+\.php(/|$) {
deny all;
}
}
location /wx {
alias /sobey/www/channel-pub-api/wx/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /wx/ {
# return 301 /wx;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /wx {
# if your location is "/wx", try use "/wx/wx/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /wx/wx/web/index.php$is_args$args;
}
# if your location is "/wx", try use "/wx/wx/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /wx/wx/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/wx/.+\.(css|js|ico|png|jpe?g|gif|svg|ttf|mp4|mov|swf|pdf|zip|rar)$ {
# log_not_found off;
# access_log off;
# try_files $uri =404;
#}
location ~ ^/wx/assets/.+\.php(/|$) {
deny all;
}
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ ^/.+\.php(/|$) {
rewrite (?!^/((api|qq|weibo|wx)/web|qq|weibo|wx))^ /api/web$uri break;
rewrite (?!^/qq/web)^/qq(/.+)$ /qq/web$1 break;
rewrite (?!^/weibo/web)^/weibo(/.+)$ /weibo/web$1 break;
rewrite (?!^/wx/web)^/wx(/.+)$ /wx/web$1 break;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $fastcgi_script_name =404;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\. {
deny all;
}
}

企鹅号:https://wjdev2.chinamcloud.com:8661/v1/qq/
微信公众帐号:https://wjdev2.chinamcloud.com:8661/v1/wx/
微博:https://wjdev2.chinamcloud.com:8661/v1/weibo/
跨渠道:https://wjdev2.chinamcloud.com:8661/v1/
授权:https://wjdev2.chinamcloud.com:8662/
PHP / Laravel / Yii2 老项目维护与长期技术支持
如果你的 PHP / Laravel / Yii2 项目已经上线,但遇到原开发离职、Bug 长期无人修复、接口不稳定、性能下降、代码难以接手等问题,可以联系我做一次远程技术排查。
适合以下情况:
✅ 老旧 PHP 系统无人维护
✅ Laravel / Yii2 项目 Bug 修复
✅ 后台管理系统小功能迭代
✅ RESTful API 接口排查
✅ MySQL / Redis / Nginx 性能问题
✅ 长期远程兼职维护
可先从一次小问题开始:
✅ 线上报错排查
✅ 接口异常分析
✅ 慢查询与性能瓶颈定位
✅ 代码结构初步评估
✅ 部署环境与日志检查
如需咨询,请联系我,并注明:PHP 维护咨询。
联系方式:
Telegram:@shuijingwan
微信:13980074657
邮箱:shuijingwanwq@gmail.com

发表回复