
{
"name": "HTTP Client Exception",
"message": "fopen(http://api.channel-pub-api.localhost/qq/v1/articles/standard?group_id=015ce30b116ce86058fa6ab4fea4ac63): failed to open stream: HTTP request failed! ",
"code": 2,
"type": "yii\\httpclient\\Exception",
"file": "E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2-httpclient\\src\\StreamTransport.php",
"line": 68,
"stack-trace": [
"#0 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2-httpclient\\src\\Transport.php(41): yii\\httpclient\\StreamTransport->send(Object(yii\\httpclient\\Request))",
"#1 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2-httpclient\\src\\Client.php(259): yii\\httpclient\\Transport->batchSend(Array)",
"#2 E:\\wwwroot\\channel-pub-api-feature-task-group\\common\\logics\\http\\channel_pub_api\\Article.php(55): yii\\httpclient\\Client->batchSend(Array)",
"#3 E:\\wwwroot\\channel-pub-api-feature-task-group\\common\\services\\TaskGroupService.php(117): common\\logics\\http\\channel_pub_api\\Article->batchPostArticlesStandard('015ce30b116ce86...', Array)",
"#4 E:\\wwwroot\\channel-pub-api-feature-task-group\\api\\filters\\TaskGroupFilter.php(45): common\\services\\TaskGroupService::createMultipleSync(Array)",
"#5 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\ActionFilter.php(92): api\\filters\\TaskGroupFilter->afterAction(Object(api\\rests\\task_group\\CreateAction), Array)",
"#6 [internal function]: yii\\base\\ActionFilter->afterFilter(Object(yii\\base\\ActionEvent))",
"#7 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\Component.php(627): call_user_func(Array, Object(yii\\base\\ActionEvent))",
"#8 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\Controller.php(305): yii\\base\\Component->trigger('afterAction', Object(yii\\base\\ActionEvent))",
"#9 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\rest\\Controller.php(76): yii\\base\\Controller->afterAction(Object(api\\rests\\task_group\\CreateAction), Array)",
"#10 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\Controller.php(159): yii\\rest\\Controller->afterAction(Object(api\\rests\\task_group\\CreateAction), Array)",
"#11 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\Module.php(528): yii\\base\\Controller->runAction('create', Array)",
"#12 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\web\\Application.php(103): yii\\base\\Module->runAction('v1/task-group/c...', Array)",
"#13 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\Application.php(386): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))",
"#14 E:\\wwwroot\\channel-pub-api-feature-task-group\\api\\web\\index.php(17): yii\\base\\Application->run()",
"#15 {main}"
],
"previous": {
"name": "PHP Warning",
"message": "fopen(http://api.channel-pub-api.localhost/qq/v1/articles/standard?group_id=015ce30b116ce86058fa6ab4fea4ac63): failed to open stream: HTTP request failed! ",
"code": 2,
"type": "yii\\base\\ErrorException",
"file": "E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2-httpclient\\src\\StreamTransport.php",
"line": 61,
"stack-trace": [
"#0 [internal function]: yii\\base\\ErrorHandler->handleError(2, 'fopen(http://ap...', 'E:\\\\wwwroot\\\\chan...', 61, Array)",
"#1 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2-httpclient\\src\\StreamTransport.php(61): fopen('http://api.chan...', 'rb', false, Resource id #205)",
"#2 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2-httpclient\\src\\Transport.php(41): yii\\httpclient\\StreamTransport->send(Object(yii\\httpclient\\Request))",
"#3 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2-httpclient\\src\\Client.php(259): yii\\httpclient\\Transport->batchSend(Array)",
"#4 E:\\wwwroot\\channel-pub-api-feature-task-group\\common\\logics\\http\\channel_pub_api\\Article.php(55): yii\\httpclient\\Client->batchSend(Array)",
"#5 E:\\wwwroot\\channel-pub-api-feature-task-group\\common\\services\\TaskGroupService.php(117): common\\logics\\http\\channel_pub_api\\Article->batchPostArticlesStandard('015ce30b116ce86...', Array)",
"#6 E:\\wwwroot\\channel-pub-api-feature-task-group\\api\\filters\\TaskGroupFilter.php(45): common\\services\\TaskGroupService::createMultipleSync(Array)",
"#7 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\ActionFilter.php(92): api\\filters\\TaskGroupFilter->afterAction(Object(api\\rests\\task_group\\CreateAction), Array)",
"#8 [internal function]: yii\\base\\ActionFilter->afterFilter(Object(yii\\base\\ActionEvent))",
"#9 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\Component.php(627): call_user_func(Array, Object(yii\\base\\ActionEvent))",
"#10 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\Controller.php(305): yii\\base\\Component->trigger('afterAction', Object(yii\\base\\ActionEvent))",
"#11 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\rest\\Controller.php(76): yii\\base\\Controller->afterAction(Object(api\\rests\\task_group\\CreateAction), Array)",
"#12 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\Controller.php(159): yii\\rest\\Controller->afterAction(Object(api\\rests\\task_group\\CreateAction), Array)",
"#13 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\Module.php(528): yii\\base\\Controller->runAction('create', Array)",
"#14 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\web\\Application.php(103): yii\\base\\Module->runAction('v1/task-group/c...', Array)",
"#15 E:\\wwwroot\\channel-pub-api-feature-task-group\\vendor\\yiisoft\\yii2\\base\\Application.php(386): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))",
"#16 E:\\wwwroot\\channel-pub-api-feature-task-group\\api\\web\\index.php(17): yii\\base\\Application->run()",
"#17 {main}"
]
}
}


## FRONTEND ##
server {
charset utf-8;
client_max_body_size 200m;
client_body_buffer_size 1024k;
fastcgi_read_timeout 180s;
listen 80; ## listen for ipv4
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
server_name www.channel-pub-api.localhost www.channel-pub-api-localhost.chinamcloud.cn auth.channel-pub.wjdev.chinamcloud.cn;
root E:/wwwroot/channel-pub-api-feature-task-group/frontend/web;
index index.php;
access_log logs/www.channel-pub-api.localhost.access.log;
error_log logs/www.channel-pub-api.localhost.error.log;
location / {
# Redirect everything that isn't a real file to 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;
}
location ~ \.php$ {
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 $uri =404;
}
location ~* /\. {
deny all;
}
}
## API ##
server {
charset utf-8;
client_max_body_size 200m;
client_body_buffer_size 1024k;
fastcgi_read_timeout 180s;
listen 80; ## listen for ipv4
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
server_name api.channel-pub-api.localhost api.channel-pub-api-localhost.chinamcloud.cn;
root E:/wwwroot/channel-pub-api-feature-task-group;
index index.php;
access_log logs/api.channel-pub-api.localhost.access.log;
error_log logs/api.channel-pub-api.localhost.error.log;
location / {
root E:/wwwroot/channel-pub-api-feature-task-group/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 /baijia {
alias E:/wwwroot/channel-pub-api-feature-task-group/baijia/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /baijia/ {
# return 301 /baijia;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /baijia {
# if your location is "/baijia", try use "/baijia/baijia/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /baijia/baijia/web/index.php$is_args$args;
}
# if your location is "/baijia", try use "/baijia/baijia/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /baijia/baijia/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/baijia/.+\.(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 ~ ^/baijia/assets/.+\.php(/|$) {
deny all;
}
}
location /customize {
alias E:/wwwroot/channel-pub-api-feature-task-group/customize/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /customize/ {
# return 301 /customize;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /customize {
# if your location is "/customize", try use "/customize/customize/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /customize/customize/web/index.php$is_args$args;
}
# if your location is "/customize", try use "/customize/customize/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /customize/customize/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/customize/.+\.(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 ~ ^/customize/assets/.+\.php(/|$) {
deny all;
}
}
location /netease {
alias E:/wwwroot/channel-pub-api-feature-task-group/netease/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /netease/ {
# return 301 /netease;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /netease {
# if your location is "/netease", try use "/netease/netease/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /netease/netease/web/index.php$is_args$args;
}
# if your location is "/netease", try use "/netease/netease/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /netease/netease/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/netease/.+\.(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 ~ ^/netease/assets/.+\.php(/|$) {
deny all;
}
}
location /qq {
alias E:/wwwroot/channel-pub-api-feature-task-group/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 E:/wwwroot/channel-pub-api-feature-task-group/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 E:/wwwroot/channel-pub-api-feature-task-group/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;
}
}
location ~ ^/.+\.php(/|$) {
rewrite (?!^/((api|baijia|customize|netease|qq|weibo|wx)/web|baijia|customize|netease|qq|weibo|wx))^ /api/web$uri break;
rewrite (?!^/baijia/web)^/baijia(/.+)$ /baijia/web$1 break;
rewrite (?!^/customize/web)^/customize(/.+)$ /customize/web$1 break;
rewrite (?!^/netease/web)^/netease(/.+)$ /netease/web$1 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;
}
location ~ /\. {
deny all;
}
}
## LOCALHOST API ##
server {
charset utf-8;
client_max_body_size 200m;
client_body_buffer_size 1024k;
fastcgi_read_timeout 180s;
listen 81; ## listen for ipv4
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
server_name localhost;
root E:/wwwroot/channel-pub-api-feature-task-group;
index index.php;
access_log logs/localhost.access.log;
error_log logs/localhost.error.log;
location / {
root E:/wwwroot/channel-pub-api-feature-task-group/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 /baijia {
alias E:/wwwroot/channel-pub-api-feature-task-group/baijia/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /baijia/ {
# return 301 /baijia;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /baijia {
# if your location is "/baijia", try use "/baijia/baijia/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /baijia/baijia/web/index.php$is_args$args;
}
# if your location is "/baijia", try use "/baijia/baijia/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /baijia/baijia/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/baijia/.+\.(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 ~ ^/baijia/assets/.+\.php(/|$) {
deny all;
}
}
location /customize {
alias E:/wwwroot/channel-pub-api-feature-task-group/customize/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /customize/ {
# return 301 /customize;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /customize {
# if your location is "/customize", try use "/customize/customize/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /customize/customize/web/index.php$is_args$args;
}
# if your location is "/customize", try use "/customize/customize/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /customize/customize/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/customize/.+\.(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 ~ ^/customize/assets/.+\.php(/|$) {
deny all;
}
}
location /netease {
alias E:/wwwroot/channel-pub-api-feature-task-group/netease/web/;
# redirect to the URL without a trailing slash (uncomment if necessary)
#location = /netease/ {
# return 301 /netease;
#}
# prevent the directory redirect to the URL with a trailing slash
location = /netease {
# if your location is "/netease", try use "/netease/netease/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri /netease/netease/web/index.php$is_args$args;
}
# if your location is "/netease", try use "/netease/netease/web/index.php$is_args$args"
# bug ticket: https://trac.nginx.org/nginx/ticket/97
try_files $uri $uri/ /netease/netease/web/index.php$is_args$args;
# omit static files logging, and if they don't exist, avoid processing by Yii (uncomment if necessary)
#location ~ ^/netease/.+\.(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 ~ ^/netease/assets/.+\.php(/|$) {
deny all;
}
}
location /qq {
alias E:/wwwroot/channel-pub-api-feature-task-group/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 E:/wwwroot/channel-pub-api-feature-task-group/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 E:/wwwroot/channel-pub-api-feature-task-group/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;
}
}
location ~ ^/.+\.php(/|$) {
rewrite (?!^/((api|baijia|customize|netease|qq|weibo|wx)/web|baijia|customize|netease|qq|weibo|wx))^ /api/web$uri break;
rewrite (?!^/baijia/web)^/baijia(/.+)$ /baijia/web$1 break;
rewrite (?!^/customize/web)^/customize(/.+)$ /customize/web$1 break;
rewrite (?!^/netease/web)^/netease(/.+)$ /netease/web$1 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:9001;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $fastcgi_script_name =404;
}
location ~ /\. {
deny all;
}
}
## MISC ##
### WWW Redirect ###
server {
listen 80;
server_name channel-pub-api.localhost;
return 301 http://www.channel-pub-api.localhost$request_uri;
}



10:37:26.340 info yii\httpclient\StreamTransport::send POST http://localhost:81/baijia/v1/articles/standard?group_id=015ce30b116ce86058fa6ab4fea4ac62
Content-Type: application/json; charset=UTF-8
10:37:29.461 info yii\httpclient\StreamTransport::send POST http://localhost:81/netease/v1/articles/standard?group_id=015ce30b116ce86058fa6ab4fea4ac62
Content-Type: application/json; charset=UTF-8
10:37:32.732 info yii\httpclient\StreamTransport::send POST http://localhost:81/weibo/v1/articles/toutiao?group_id=015ce30b116ce86058fa6ab4fea4ac62
Content-Type: application/json; charset=UTF-8
10:37:35.757 info yii\httpclient\StreamTransport::send POST http://localhost:81/qq/v1/articles/standard?group_id=015ce30b116ce86058fa6ab4fea4ac62
Content-Type: application/json; charset=UTF-8
10:37:38.533 info yii\httpclient\StreamTransport::send POST http://localhost:81/qq/v1/articles/standard?group_id=015ce30b116ce86058fa6ab4fea4ac62
Content-Type: application/json; charset=UTF-8
10:37:41.132 info yii\httpclient\StreamTransport::send POST http://localhost:81/wx/v1/wx-articles/article?group_id=015ce30b116ce86058fa6ab4fea4ac62
Content-Type: application/json; charset=UTF-8
10:37:44.207 info yii\httpclient\StreamTransport::send POST http://localhost:81/customize/v1/articles/standard?group_id=015ce30b116ce86058fa6ab4fea4ac62
Content-Type: application/json; charset=UTF-8
<pre class="wp-block-syntaxhighlighter-code">
<?php
sleep(30);
file_put_contents('E:/wwwroot/channel-pub-api/console/runtime/logs/sleep-0-' . time() . '.txt', time());
phpinfo();
?>
</pre>
<pre class="wp-block-syntaxhighlighter-code">
<?php
sleep(5);
file_put_contents('E:/wwwroot/channel-pub-api/console/runtime/logs/sleep-1-' . time() . '.txt', time());
phpinfo();
?>
</pre>


sleep-0-1585200354.txt
sleep-1-1585200359.txt

sleep-0-1585202045.txt
sleep-1-1585202022.txt


[root@5b9088596e62 /]# curl http://127.0.0.1/status
pool: www
process manager: static
start time: 26/Mar/2020:13:50:05 +0800
start since: 4603
accepted conn: 516
listen queue: 0
max listen queue: 0
listen queue len: 128
idle processes: 39
active processes: 1
total processes: 40
max active processes: 10
max children reached: 0
slow requests: 0
PHP / Laravel / Yii2 老项目维护与长期技术支持
如果你的 PHP / Laravel / Yii2 项目已经上线,但遇到原开发离职、Bug 长期无人修复、接口不稳定、性能下降、代码难以接手等问题,可以联系我做一次远程技术排查。
适合以下情况:
✅ 老旧 PHP 系统无人维护
✅ Laravel / Yii2 项目 Bug 修复
✅ 后台管理系统小功能迭代
✅ RESTful API 接口排查
✅ MySQL / Redis / Nginx 性能问题
✅ 长期远程兼职维护
可先从一次小问题开始:
✅ 线上报错排查
✅ 接口异常分析
✅ 慢查询与性能瓶颈定位
✅ 代码结构初步评估
✅ 部署环境与日志检查
如需咨询,请联系我,并注明:PHP 维护咨询。
联系方式:
Telegram:@shuijingwan
微信:13980074657
邮箱:shuijingwanwq@gmail.com

发表回复