• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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

afuego

Basic Pleskian
Plesk Certified Expert
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