Re: Virtual Hosting: One website doesn't work.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm making a guess here.  Are you asking whether I assign Host: as being example.com or www.example.com?  Here's the script from each.  They are slightly different, but the result is the same.

$ telnet www.example.com 80
Trying 104.236.xxx.yyy...
Connected to example.com.
Escape character is '^]'.
get / http/1.1
Host: www.example.com

HTTP/1.0 301 Moved Permanently
Date: Sat, 03 Jan 2015 17:07:37 GMT
Server: Apache/2.4.10 (Ubuntu)
X-Powered-By: PHP/5.5.12-2ubuntu4.1
X-Pingback: http://example.com/xmlrpc.php
Location: http://example.com/
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8

Connection closed by foreign host.



$ cat example.com.txt 
$ telnet www.example.com 80
Trying 104.236.xxx.yyy...
Connected to example.com.
Escape character is '^]'.
GET / HTTP/1.1
Host: example.com

HTTP/1.1 301 Moved Permanently
Date: Sat, 03 Jan 2015 17:06:38 GMT
Server: Apache/2.4.10 (Ubuntu)
Location: http://www.example.com//
Content-Length: 317
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.example.com//";>here</a>.</p>
<hr>
<address>Apache/2.4.10 (Ubuntu) Server at example.com Port 80</address>
</body></html>
Connection closed by foreign host.


Notice something odd here, might be a clue.  The "Location:" field is assigned with a FQDN appended with '//' which doesn't seem proper to me.  I'm not sure how extra slashes are dealt with in the specification, but that's not something I typically type in when typing URL's into a web browser.


On January 2, 2015 at 10:32 PM, "Eric Covener" <covener@xxxxxxxxx> wrote:
>
>On Fri, Jan 2, 2015 at 7:52 PM,  <ghalvors78@xxxxxxxxxxxx> wrote:
>> But there is one site that is does not load at all:
>>
>> $ telnet example.com 80
>> Trying 104.236.xxx.yyy...
>> Connected to example.com.
>> Escape character is '^]'.
>> GET / HTTP/1.1
>> Host: www.example.com
>>
>> Location: http://example.com/
>
>Does example.com work? Have you looked in your configuration to see
>what performs this redirect from www to no-www?
>
>Does it fail only for the hostname of the actual system?
>
>-------------------------------------------------------------------
>--
>To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux