• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

Resolved Can't see original apache response using curl -lv mydomain.com:7080

  • Thread starter Deleted member 209767
  • Start date
D

Deleted member 209767

Guest
Server operating system version
Linux
Plesk version and microupdate number
Plesk
I run apache/nginx proxy mode and I need to see the original response from apache using :
curl -lv https://www.mydomain.com:7080

I added this to etc/hosts
127.0.0.1 mydomain.com
127.0.0.1 www.mydomain.com

but I always get 404 error

[root@ns508279 ~]# curl -lv http://www.mydomain.com:7080/template/test.html
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to www.mydomain.com (127.0.0.1) port 7080 (#0)
> GET /template/test.html HTTP/1.1
> Host: www.mydomain.com:7080
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Date: Sun, 08 May 2022 16:56:29 GMT
< Server: Apache
< Content-Length: 196
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body></html>
 
Hi,

With my server IP i was getting 301 moved permanently. I found the solution. It was because the option to redirect HTTP to https was enabled in Plesk

But I have another question

[root@ns508279 ~]# curl -lv http://www.mydomain.com:7080/somefile.webp
* Trying 167.114.64.16...
* TCP_NODELAY set
* Connected to www.mydomain.com (167.114.64.16) port 7080 (#0)
> GET /somefile.webp HTTP/1.1
> Host: www.mydomain.com:7080
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 11 May 2022 05:08:18 GMT
< Server: Apache
< Link: <http://www.mydomain.com:7080/somefile.png>; rel="canonical"
< Accept-Ranges: bytes
< Connection: Keep-Alive
< Expires: Thu, 11 May 2023 05:08:18 GMT
< Cache-Control: max-age=31536000
< Etag: W/"0"
< Last-Modified: Wed, 11 May 2022 05:08:18 GMT
< X-Original-Content-Length: 3438
< Content-Length: 3222
< Vary: Accept-Encoding
< Content-Type: image/webp

The rel=canonical header is lost when nginx proxy the request from apache. When looking at the header response from nginx, there is no rel=canonical. Why?
 
not sure what is your expectation.

I've added custom apache directives like below:
<Directory "/">
Header set rel canonical
<FilesMatch ".*">
Header set rel incanonical
</FilesMatch>
</Directory>
after invoking curl testdomain.tld:7080 -v i get a responce like below:
* Rebuilt URL to: testdomain.tld:7080/
* Trying 10.52.64.180...
* TCP_NODELAY set
* Connected to testdomain.tld (10.52.64.180) port 7080 (#0)
> GET / HTTP/1.1
> Host: testdomain.tld:7080
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Thu, 12 May 2022 02:57:24 GMT
< Server: Apache
< Last-Modified: Thu, 12 May 2022 02:47:02 GMT
< ETag: "87-5dec7928c4db4"
< Accept-Ranges: bytes
< Content-Length: 135
< rel: incanonical
< Content-Type: text/html
<
<html>
<head>
<title>small index file 64-180</title>
</head>
<body>
<div align=center>Hello world</div>
</body>
</html>
* Connection #0 to host testdomain.tld left intact

the same but with nginx:
]# curl testdomain.tld -v
* Rebuilt URL to: testdomain.tld/
* Trying 10.52.64.180...
* TCP_NODELAY set
* Connected to testdomain.tld (10.52.64.180) port 80 (#0)
> GET / HTTP/1.1
> Host: testdomain.tld
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 12 May 2022 02:59:06 GMT
< Content-Type: text/html
< Content-Length: 135
< Connection: keep-alive
< X-Accel-Version: 0.01
< Last-Modified: Thu, 12 May 2022 02:47:02 GMT
< ETag: "87-5dec7928c4db4"
< Accept-Ranges: bytes
< rel: incanonical
< X-Powered-By: PleskLin
<
<html>
<head>
<title>small index file 64-180</title>
</head>
<body>
<div align=center>Hello world</div>
</body>
</html>
* Connection #0 to host testdomain.tld left intact
as you can see, in my case custom tag "rel" passed in response.
 
Back
Top