• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question http://website.com:443 - 400 Bad Request

afuego

Basic Pleskian
Server operating system version
Ubuntu
Plesk version and microupdate number
Plesk 18.0.55
I have the situation where http://websiteserver2.com:443 in plesk server 2 brings 400 Bad Request error.

In another plesk server 1 http://websiteserver1.com:443 forwards the traffic to https://.

I would like to replicate this behavior. How is it possible?

Curl results are the same for both websites are the same
# curl --head http://websiteserver2.com:443
HTTP/1.1 400 Bad Request
Server: nginx
Date: Fri, 22 Sep 2023 14:29:44 GMT
Content-Type: text/html
Content-Length: 248
Connection: close

# curl --head http://websiteserver1.com:443
HTTP/1.1 400 Bad Request
Server: nginx
Date: Fri, 22 Sep 2023 14:29:44 GMT
Content-Type: text/html
Content-Length: 248
Connection: close
 
This error can have different reasons. It could be that the proxy mode is not configured correctly (what's the output of plesk db "select * from ServiceNodeConfiguration where section in ('webProxy','webServer');"?), it could be that cookies or headers are too large. It is also possible that the domain resolves to a wrong IP address.
 
1) Backup the psa database:
# MYSQL_PWD=cat /etc/psa/.psa.shadow mysqldump -u admin psa > psadate +%F_%H.%M.sql

2) Make sure configuration is correct:
# plesk db "UPDATE ServiceNodeConfiguration SET value="7080" WHERE section="webServer" AND value="80";"
# plesk db "UPDATE ServiceNodeConfiguration SET value="7081" WHERE section="webServer" AND value="443";"

3) Reconfigure domains
# plesk sbin nginxmng -d
# plesk sbin nginxmng -e
 
1) Backup the psa database:
# MYSQL_PWD=cat /etc/psa/.psa.shadow mysqldump -u admin psa > psadate +%F_%H.%M.sql

2) Make sure configuration is correct:
# plesk db "UPDATE ServiceNodeConfiguration SET value="7080" WHERE section="webServer" AND value="80";"
# plesk db "UPDATE ServiceNodeConfiguration SET value="7081" WHERE section="webServer" AND value="443";"

3) Reconfigure domains
# plesk sbin nginxmng -d
# plesk sbin nginxmng -e
When I ran this MYSQL_PWD=cat /etc/psa/.psa.shadow mysqldump -u admin psa > psadate +%F_%H.%M.sql I got permission denied.

Would this plesk db dump psa > /root/psa_dump.sql has the same effect?
I back up the psa database with the instructions above and ran the update and have the same behavior.

plesk db "select * from ServiceNodeConfiguration where section in ('webProxy','webServer');" looks like this for the server with 400 Bad Error Request

1695659733506.png


One of the servers that works -> plesk db "select * from ServiceNodeConfiguration where section in ('webProxy','webServer');" was the same as plesk server 2 without the Updates
1695660088480.png


I do not understand why Plesk Support says this is not possible when I have 2 Plesk servers where http://domain:443 pushes to https://domain .
 
Back
Top