• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Nginx 400 bad request with api call (php curl)

Erwan

Regular Pleskian
Hi all,

We have a problem when we call an api with php curl: it works when the call is from our local server but if the call is from the same server (developpment website in our case) on the same server, we have this nginx error: 400 bad request nginx.
When we use the url directly like a website, it works.

Do you have an idea? A problem with a nginx conf?
We don't have change anything from plesk default.

We try to reproduce the problem with this command:
#curl --v -H "Host:" https://mydomain.com/export"

Result:
* About to connect() to mydomain.com port 443 (#0)
* Trying x.x.x.x...
* Connected to mydoman.com (x.x.x.x) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* subject: CN=mydomain.com
* start date: août 25 08:13:08 2019 GMT
* expire date: nov. 23 08:13:08 2019 GMT
* common name: mydomain.com
* issuer: CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US
> GET /export HTTP/1.1
> User-Agent: curl/7.29.0
> Accept: */*
>
< HTTP/1.1 400 Bad Request
< Server: nginx
< Date: Thu, 17 Oct 2019 10:12:17 GMT
< Content-Type: text/html
< Content-Length: 150
< Connection: close

An idea?
 
Back
Top