产品服务AMH 免费服务器主机面板SSL证书 免费SSL证书申请编程助手免费智能写代码、翻译NewAMYSQL 免费MySQL管理工具AMFTP 免费FTP管理客户端

AMH 社区首页

 AMH社区 - 开放自由有价值的社区

[求助帖] 400 Bad Request连续两天都在调试 吐血 求助

BruceLee
铁牌会员
150.00 价值分

BruceLee 发表于 2014-08-25 12:25:10



Zen cart的网站,之前是安装在kloxo面板的vps上面,正常的网站,转移到AMH面板的vps上面,一直提示400 Bad Request

AMH安装非常正常,是按照官方的配置进行安排的,安装过程非常顺利,没有遇到问题。

AMH的配置,我没有修改过。

网站是zen cart的程序,绑定好域名,转移完源码,导入好了数据库,打开网站一直提示400 Bad Request

已经按照amh.sh论坛的帖子做了一些处理,但是还是没有效果:

——————————————————————————————————
已经处理:http://amh.sh/bbs/post-669-1-1.htm

Nginx中经常出现难以查找原因的400错误,主要是这两个配置造成的,配置nginx.conf这两项:
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
修改完成之后
/usr/local/nginx/sbin/nginx -s reload实在不行amh nginx stop然后
amh nginx start

按照这个处理完,还是不行;

———————————————————————————————————
已经处理:http://amh.sh/bbs/forum.php?mod=viewthread&tid=735&page=1#pid4573

你可以在虚拟主机那边把ip都绑上,然后这里就有了。
或用命令设置也行,

设置允许IP
amh SetParam amh amh_domain 123.8.8.8

取消,无限制:
amh SetParam amh amh_domain Off

配置里面直接是无限制的,但是,还是提示400错误

———————————————————————————————————
已经处理:http://amh.sh/bbs/post-623-1-1.htm 测试都是正确的

没绑定到主机的域名而解析到主机默认是返回400的。
400 bad request

/usr/local/nginx/sbin/nginx -t
测试Nginx是否正常。

测试提示结果是正常的,求助,AMH高手指点一下。
评价: 这个问题有价值吗?  没有 (0分)   有, 感谢 (0分)
2014-08-25 12:25:10 1

BruceLee
铁牌会员
150.00 价值分




这是检测配置文件的结果

下面是伪静态规则
if ($host !~* www\.(.*)) {
rewrite ^(.*)$ http://www.$host$1 permanent;
}

location / {
# if the requested file exists, return it immediately
if (-f $request_filename) {
break;
}

rewrite "^/(.*)-p-(.*).html$" /index.php?main_page=product_info&products_id=$2&% last;
rewrite "^/(.*)-c-(.*).html$" /index.php?main_page=index&cPath=$2&% last;
rewrite "^/(.*)-m-([0-9]+).html$" /index\.php?main_page=index&manufacturers_id=$2&% last;
rewrite "^/(.*)-pi-([0-9]+).html$" /index\.php?main_page=popup_image&pID=$2&% last;
rewrite "^/(.*)-pr-([0-9]+).html$" /index\.php?main_page=product_reviews&products_id=$2&% last;
rewrite "^/(.*)-pri-([0-9]+).html$" /index\.php?main_page=product_reviews_info&products_id=$2&% last;
# For wordpress on zencart by Jeff
rewrite "^/wp/(.*).html$" /index.php?main_page=wordpress&page_id=$1&% last;

# For eazy pages
rewrite "^/(.*)-ezp-([0-9]+).html$" /index\.php?main_page=page&id=$2&% last;

# For Open Operations Info Manager
rewrite "^(.*)-i-([0-9]+).html" /index.php?main_page=info_manager&pages_id=$2&% last;

# For dreamscape?беs News & Articles Manager
rewrite "^news/?" /index.php?main_page=news&% last;
rewrite "^news/rss.xml" /index.php?main_page=news_rss&% last;
rewrite "^news/archive/?" /index.php?main_page=news_archive&% last;
rewrite "^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html" /index.php?main_page=news&date=$1-$2-$3&% last;
rewrite "^news/archive/([0-9]{4})-([0-9]{2}).html" /index.php?main_page=news_archive&date=$1-$2&% last;
rewrite "^news/(.*)-a-([0-9]+)-comments.html" /index.php?main_page=news_comments&article_id=$2&% last;
rewrite "^news/(.*)-a-([0-9]+).html" /index.php?main_page=news_article&article_id=$2&% last;

# All other pages
# Don't rewrite real files or directories
rewrite "^(.*).html" /index.php?main_page=$1&% last;
}
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-08-25 12:27:51 2

BruceLee
铁牌会员
150.00 价值分

下面是执行amh cat_nginx命令的结果,在线求助,感谢!
amh cat_nginx

user www www;
worker_processes auto;
error_log /home/wwwroot/index/log/nginx_error.log crit;
pid /usr/local/nginx/logs/nginx.pid;

#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;

events
{
use epoll;
worker_connections 51200;
}

http
{
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;

sendfile on;
tcp_nopush on;

keepalive_timeout 60 60;

fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 16k;
fastcgi_buffers 16 16k;
fastcgi_busy_buffers_size 16k;
fastcgi_temp_file_write_size 16k;
fastcgi_intercept_errors on;

tcp_nodelay on;
server_tokens off;
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml application/rss+xml application/xhtml+xml application/atom_xml;
gzip_disable "MSIE [1-6].(?!.*SV1)";
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';

include vhost/*.conf;
server
{
listen 8888;
server_name www.amysql.com;
index index.html index.htm index.php;
root /home/wwwroot/index/web;
fastcgi_buffer_size 4k;
fastcgi_buffers 8 4k;
fastcgi_busy_buffers_size 4k;
gzip off;

location ~ .*\.php$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}

location ~ .*\.(js|css)?$
{
expires 12h;
}

access_log /home/wwwroot/index/log/access.log combined;
error_log /home/wwwroot/index/log/error.log crit;
}

server
{
listen 80 default;
return 400;
}
}
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-08-25 12:33:31 3

BruceLee
铁牌会员
150.00 价值分

这个400 Bad Request错误,还是没有朋友能够解决么?
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-08-25 14:18:43 4

BruceLee
铁牌会员
150.00 价值分

为什么我把相关问题、配置信息都发布出来了,就是没有一个人能看出其中的问题呢?
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-08-25 14:43:28 5

南无乐乐
铁牌会员
84.00 价值分

引用:
BruceLee 发表于 2014-8-25 14:43
为什么我把相关问题、配置信息都发布出来了,就是没有一个人能看出其中的问题呢? ...


你把有问题的域名绑定到第一个站(没问题的那个)上面试试
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-08-25 15:32:14 6

donxan
铁牌会员
149.00 价值分

好多人问题都不会解决的 哎。。。
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-08-25 15:33:32 7

tqzone
铝牌会员
384.03 价值分

引用:
BruceLee 发表于 2014-8-25 14:43
为什么我把相关问题、配置信息都发布出来了,就是没有一个人能看出其中的问题呢? ...


方便的话加一下朕的QQ。3096527
评价: 这个答复有价值吗?  没有 (-2.97分)   有, 感谢 (0分)
回复  2014-08-25 15:34:21 8

南无乐乐
铁牌会员
84.00 价值分

我有一点想不明白,别人是帮助你,我没有看到你一句感谢,反倒有所埋怨,不管最后结果怎样,有没有解决你的问题,你都应该心怀感激,问题的可能性太多,大家都在很积极的帮你了,这么热血的论坛现在已经很少见了,您为什么还不知足呢?
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-08-25 15:42:16 9

wedb
铜牌会员
573.85 价值分

规则问题,把规则全去掉
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-08-25 15:42:53 10
 1 2 >  (总2页)
AMH社区列表
用户服务中心