Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-04 Thread Noel Butler
 

and the httpd vhost conf details are? 

please dont say standard, there is nothing standard about how ubuntu
names httpd's files and dirs 

On 04/01/2015 12:19, ghalvor...@hushmail.com wrote: 

 Okay, it occurred to me that I never at any point expected the file 
 xmlprc.php to load automatically. I would have guessed something like an 
 index.php or index.html to load instead. I reinstalled wordpress, but that 
 seemed to make no difference.
 
 All that is in my DocumentRoot directory is a single index.html, and that 
 doesn't even load. I'm starting to wonder if this particular domain name is 
 somehow tainted since the other sites seem to work just fine.
 
 What I noticed that is particularly weird is that my method for testing seems 
 to be flawed. According to my method for testing via telnet gives the same 
 results for all my sites, whereas testing with wget on my other site returns 
 the correct page. So the lines of get / http/1.1, Host: example.com seem 
 to be an inaccurate test. Nothing is as it seems. I really thought I 
 understood how this webserver works... I'm totally at a loss of explanation 
 of why it just doesn't work; this shouldn't be so hard.
 
 So I did a 'wget example.info' and I get the correct webpage. I follow the 
 same approach via telnet on port 80, as seen below, I get totally different 
 results. What is wrong with this test that would give a different result from 
 wget?
 
 $ telnet example.info 80
 Trying 104.236.xxx.yyy...
 Connected to example.info.
 Escape character is '^]'.
 get / http/1.1
 host: www.example.info [1]
 
 HTTP/1.1 501 Not Implemented
 Date: Sun, 04 Jan 2015 02:05:32 GMT
 Server: Apache/2.4.10 (Ubuntu)
 Allow: GET,HEAD,POST,OPTIONS
 Content-Length: 282
 Connection: close
 Content-Type: text/html; charset=iso-8859-1
 
 !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
 htmlhead
 title501 Not Implemented/title
 /headbody
 h1Not Implemented/h1
 pget to /index.html not supported.br /
 /p
 hr
 addressApache/2.4.10 (Ubuntu) Server at www.example.info [1] Port 
 80/address
 /body/html
 Connection closed by foreign host.
 
 $ telnet example.info 80
 Trying 104.236.xxx.yyy...
 Connected to example.info.
 Escape character is '^]'.
 get / http/1.1
 host: example.info
 
 HTTP/1.1 301 Moved Permanently
 Date: Sun, 04 Jan 2015 02:06:01 GMT
 Server: Apache/2.4.10 (Ubuntu)
 Location: http://www.example.info// [2]
 Content-Length: 309
 Content-Type: text/html; charset=iso-8859-1
 
 !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
 htmlhead
 title301 Moved Permanently/title
 /headbody
 h1Moved Permanently/h1
 pThe document has moved a href=http://www.example.info// 
 [2]here/a./p
 hr
 addressApache/2.4.10 (Ubuntu) Server at example.info Port 80/address
 /body/html
 Connection closed by foreign host.
 
 On January 3, 2015 at 8:40 PM, ghalvor...@hushmail.com wrote:
 On January 3, 2015 at 7:36 PM, Nick Kew n...@webthing.com wrote: On Sat, 
 03 Jan 2015 12:19:38 -0500 ghalvor...@hushmail.com wrote: I'm making a guess 
 here. Are you asking whether I assign Host: as being example.com or 
 www.example.com? [3] Here's the script from each. They are slightly 
 different, but the result is the same. Not actually the same ...
 Yes, I noticed that. I noticed the difference later on in composing the
message, but forgot to modify the first sentence during proofreading. 

 $ telnet www.example.com [4] 80 Trying 104.236.xxx.yyy... Connected to 
 example.com. Escape character is '^]'. get / http/1.1 Host: www.example.com 
 [4] 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 [5] Location: http://example.com/ 
 [6] Content-Length: 0 Connection: close Content-Type: text/html; 
 charset=UTF-8
 That redirect is issued by your PHP script. 
 
 $ telnet www.example.com [4] 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// [7] 
 Content-Length: 317 Content-Type: text/html; charset=iso-8859-1
 ... whereas that looks like a server redirection with a stray extra slash, 
 and is probably generated from your apache configuration. Decide which you 
 want to use, then configure your server and your PHP to agree on it.
 That file, xmlprc.php is something generated by wordpress. I'm in no
way familiar with how wordpress works. So this may be a wordpress
configuration issue. The simplest may be to reinstall wordpress and hope
it works. I'm not sure why these two behave differently (www.example.com
[4] vs example.com) I always thought the extra four letters were
something that Apache knew how to deal with. It's hard to guarantee that
the user will user type or omit the 'www.' What should be done about
this? 

 -- Nick Kew 

Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-04 Thread Noel Butler
 

get rid of wordpress and anything else, install a temp placeholder
index.html file, get it working with basics before expanding, if that
works, then your problem is wordpress and you should take it up with
their lists/forums/newsgroups 

On 04/01/2015 12:35, ghalvor...@hushmail.com wrote: 

 On January 3, 2015 at 9:09 PM, Stormy storm...@stormy.ca wrote:
 At 08:40 PM 1/3/2015 -0500, ghalvor...@hushmail.com wrote: [snip] I'm not 
 sure why these two behave differently (www.example.com [1] vs example.com) I 
 always thought the extra four letters were something that Apache knew how to 
 deal with. It's hard to guarantee that the user will user type or omit the 
 'www.' What should be done about this? ServerAlias ?

It was undefined. I thought I would implement it according to online
documentation. I retyped an equivalent excerpt from my sites-available
directory.

ServerName www.example.com [1]
ServerAlias example.com
DocumentRoot /var/www/example.com/ht-docs/

When I perform the telnet 80 test, I get a 501 Not Implemented, but
the wget command pulls the index.html correctly. I never trust a web
browser when diagnosing a web page because they like to cache web files.
I used telnet to simulate a web browser request, as explained in a blog,
but it is apparently wrong...

This is the offending article I used, by the way.

http://www.the-art-of-web.com/system/telnet-http11/ [2]

 Best -- Paul 
 --- -- To 
 unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional 
 commands, e-mail: users-h...@httpd.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

 

Links:
--
[1] http://www.example.com
[2] http://www.the-art-of-web.com/system/telnet-http11/


Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-04 Thread Zimmi

Hi,

From the 501 Not implemented and from some of your telnet sessions 
copies, I see you use also get / http/1.1 but beware, HTTP is case 
sensitive, and you should use GET / HTTP/1.1. This would explain why 
wget gets your resource correctly but you can't get it through telnet.


Hope this help!
Zimmi

Le 04.01.2015 03:35, ghalvor...@hushmail.com a écrit :


On January 3, 2015 at 9:09 PM, Stormy storm...@stormy.ca wrote:

At 08:40 PM 1/3/2015 -0500, ghalvor...@hushmail.com wrote:
[snip]

I'm not sure why these two behave differently (www.example.com vs
example.com) I always thought the extra four letters were

something that

Apache knew how to deal with.  It's hard to guarantee that the

user will

user type or omit the 'www.'  What should be done about this?

ServerAlias ?

It was undefined.  I thought I would implement it according to online 
documentation.  I retyped an equivalent excerpt from my sites-available 
directory.

ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/example.com/ht-docs/

When I perform the telnet 80 test, I get a 501 Not Implemented, but the wget 
command pulls the index.html correctly.  I never trust a web browser when diagnosing a 
web page because they like to cache web files.  I used telnet to simulate a web browser 
request, as explained in a blog, but it is apparently wrong...

This is the offending article I used, by the way.

http://www.the-art-of-web.com/system/telnet-http11/



Best -- Paul


---
--
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-04 Thread Freek de Kruijf
Op zaterdag 3 januari 2015 21:35:32 schreef ghalvor...@hushmail.com:
 When I perform the telnet 80 test, I get a 501 Not Implemented, but the
 wget command pulls the index.html correctly.  I never trust a web browser
 when diagnosing a web page because they like to cache web files.  I used
 telnet to simulate a web browser request, as explained in a blog, but it is
 apparently wrong...

When you use telnet something 80 that something, when it is a name, does not 
appear in the communication with your web server, only the IP address is used, 
which is needed to end up in a named virtual host. So in this case you always 
ends up in the default web site of your apache configuration.
When you use wget something/... that something, when it is a name, will appear 
in the communication and apache will use that name to find the named virtual 
host.

When testing different virtual named hosts on the same system I define these 
names, like example.com, www.example.com, etc. in /etc/hosts pointing to 
127.0.0.1. You can always use the reconnect icon of the web browser to get a 
fresh version of the page you are accessing. Never had any problem with that.

-- 
fr.gr.

Freek de Kruijf


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-04 Thread ghalvors78
Classify this thread resolved.  I didn't know that HTTP was case sensitive, and 
that resulted in inconsistent behavior.  Just as I was about to call a priest 
to exorcize a virtual machine.

* It appears that adding ServerAlias corrected the behavior.

* It is true that misuse of the telnet www.example.com 80 as a testing method 
led to misleading results.

Thanks all for the help.  Things are up and running as they should be.  This is 
s going into my blog.


On January 4, 2015 at 9:00 AM, Zimmi zimm...@gmail.com wrote:

Hi,

 From the 501 Not implemented and from some of your telnet 
sessions 
copies, I see you use also get / http/1.1 but beware, HTTP is 
case 
sensitive, and you should use GET / HTTP/1.1. This would explain 
why 
wget gets your resource correctly but you can't get it through 
telnet.

Hope this help!
Zimmi

Le 04.01.2015 03:35, ghalvor...@hushmail.com a écrit :

 On January 3, 2015 at 9:09 PM, Stormy storm...@stormy.ca 
wrote:
 At 08:40 PM 1/3/2015 -0500, ghalvor...@hushmail.com wrote:
 [snip]
 I'm not sure why these two behave differently (www.example.com 
vs
 example.com) I always thought the extra four letters were
 something that
 Apache knew how to deal with.  It's hard to guarantee that the
 user will
 user type or omit the 'www.'  What should be done about this?
 ServerAlias ?
 It was undefined.  I thought I would implement it according to 
online documentation.  I retyped an equivalent excerpt from my 
sites-available directory.

 ServerName www.example.com
 ServerAlias example.com
 DocumentRoot /var/www/example.com/ht-docs/

 When I perform the telnet 80 test, I get a 501 Not 
Implemented, but the wget command pulls the index.html correctly. 
 I never trust a web browser when diagnosing a web page because 
they like to cache web files.  I used telnet to simulate a web 
browser request, as explained in a blog, but it is apparently 
wrong...

 This is the offending article I used, by the way.

 http://www.the-art-of-web.com/system/telnet-http11/


 Best -- Paul


 
---
 --
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org

 -

 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org




---
--
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-03 Thread ghalvors78
I'm not sure what you are asking.  No, it doesn't work.  That was the one I 
demonstrated in telnet.  I did not get my screen filled with HTML, instead I 
got an error message.

I actually copied the conf file from a working website and only renamed the 
ServerName and DocumentRoot, noting else.  The directory, and all 
subdirectories have the same ownership.

How come I can host seven different websites and have one that fails, even 
though their conf files differ only in the DocumentRoot and ServerName.  IT 
seems unusual.  I wouldn't think that I'm hosting too many websites, but 7 is 
(2^3)-1.  Just kidding there, but sometimes I wonder.
 
On January 2, 2015 at 10:32 PM, Eric Covener cove...@gmail.com wrote:

On Fri, Jan 2, 2015 at 7:52 PM,  ghalvor...@hushmail.com wrote:
 But there is one site that is does not load at all:

 $ telnet example.com 80
 Trying 104.236.25.70...
 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-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-03 Thread ghalvors78
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
htmlhead
title301 Moved Permanently/title
/headbody
h1Moved Permanently/h1
pThe document has moved a href=http://www.example.com//;here/a./p
hr
addressApache/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 cove...@gmail.com wrote:

On Fri, Jan 2, 2015 at 7:52 PM,  ghalvor...@hushmail.com 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-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-03 Thread Nick Kew
On Sat, 03 Jan 2015 12:19:38 -0500
ghalvor...@hushmail.com wrote:

 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.

Not actually 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

That redirect is issued by your PHP script.

 $ 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

... whereas that looks like a server redirection
with a stray extra slash, and is probably generated
from your apache configuration.

Decide which you want to use, then configure your server
and your PHP to agree on it.

-- 
Nick Kew

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-03 Thread ghalvors78


On January 3, 2015 at 7:36 PM, Nick Kew n...@webthing.com wrote:

On Sat, 03 Jan 2015 12:19:38 -0500
ghalvor...@hushmail.com wrote:

 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.

Not actually the same ...

Yes, I noticed that. I noticed the difference later on in composing the 
message, but forgot to modify the first sentence during proofreading.


 
 $ 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

That redirect is issued by your PHP script.

 $ 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

... whereas that looks like a server redirection
with a stray extra slash, and is probably generated
from your apache configuration.

Decide which you want to use, then configure your server
and your PHP to agree on it.


That file, xmlprc.php is something generated by wordpress.  I'm in no way 
familiar with how wordpress works.  So this may be a wordpress configuration 
issue.  The simplest may be to reinstall wordpress and hope it works.  I'm not 
sure why these two behave differently (www.example.com vs example.com) I always 
thought the extra four letters were something that Apache knew how to deal 
with.  It's hard to guarantee that the user will user type or omit the 'www.'  
What should be done about this?

-- 
Nick Kew

---
--
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-03 Thread Stormy

At 08:40 PM 1/3/2015 -0500, ghalvor...@hushmail.com wrote:
[snip]
I'm not sure why these two behave differently (www.example.com vs 
example.com) I always thought the extra four letters were something that 
Apache knew how to deal with.  It's hard to guarantee that the user will 
user type or omit the 'www.'  What should be done about this?


ServerAlias ?

Best -- Paul 



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-03 Thread ghalvors78
Okay, it occurred to me that I never at any point expected the file xmlprc.php 
to load automatically.  I would have guessed something like an index.php or 
index.html to load instead.  I reinstalled wordpress, but that seemed to make 
no difference.

All that is in my DocumentRoot directory is a single index.html, and that 
doesn't even load.  I'm starting to wonder if this particular domain name is 
somehow tainted since the other sites seem to work just fine.

What I noticed that is particularly weird is that my method for testing seems 
to be flawed.  According to my method for testing via telnet gives the same 
results for all my sites, whereas testing with wget on my other site returns 
the correct page.  So the lines of get / http/1.1, Host: example.com seem 
to be an inaccurate test.  Nothing is as it seems.  I really thought I 
understood how this webserver works...  I'm totally at a loss of explanation of 
why it just doesn't work; this shouldn't be so hard.

So I did a 'wget example.info' and I get the correct webpage.  I follow the 
same approach via telnet on port 80, as seen below, I get totally different 
results.  What is wrong with this test that would give a different result from 
wget?

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

HTTP/1.1 501 Not Implemented
Date: Sun, 04 Jan 2015 02:05:32 GMT
Server: Apache/2.4.10 (Ubuntu)
Allow: GET,HEAD,POST,OPTIONS
Content-Length: 282
Connection: close
Content-Type: text/html; charset=iso-8859-1

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title501 Not Implemented/title
/headbody
h1Not Implemented/h1
pget to /index.html not supported.br /
/p
hr
addressApache/2.4.10 (Ubuntu) Server at www.example.info Port 80/address
/body/html
Connection closed by foreign host.


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

HTTP/1.1 301 Moved Permanently
Date: Sun, 04 Jan 2015 02:06:01 GMT
Server: Apache/2.4.10 (Ubuntu)
Location: http://www.example.info//
Content-Length: 309
Content-Type: text/html; charset=iso-8859-1

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title301 Moved Permanently/title
/headbody
h1Moved Permanently/h1
pThe document has moved a href=http://www.example.info//;here/a./p
hr
addressApache/2.4.10 (Ubuntu) Server at example.info Port 80/address
/body/html
Connection closed by foreign host.



On January 3, 2015 at 8:40 PM, ghalvor...@hushmail.com wrote:

On January 3, 2015 at 7:36 PM, Nick Kew n...@webthing.com 
wrote:

On Sat, 03 Jan 2015 12:19:38 -0500
ghalvor...@hushmail.com wrote:

 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.

Not actually the same ...

Yes, I noticed that. I noticed the difference later on in 
composing the message, but forgot to modify the first sentence 
during proofreading.


 
 $ 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

That redirect is issued by your PHP script.

 $ 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

... whereas that looks like a server redirection
with a stray extra slash, and is probably generated
from your apache configuration.

Decide which you want to use, then configure your server
and your PHP to agree on it.


That file, xmlprc.php is something generated by wordpress.  I'm in 
no way familiar with how wordpress works.  So this may be a 
wordpress configuration issue.  The simplest may be to reinstall 
wordpress and hope it works.  I'm not sure why these two behave 
differently (www.example.com vs example.com) I always thought the 
extra four letters were something that Apache knew how to deal 
with.  It's hard to guarantee that the user will user type or omit 
the 'www.'  What should be done about this?

-- 
Nick Kew

--
-
--
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


---
--
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional 

Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-03 Thread ghalvors78


On January 3, 2015 at 9:09 PM, Stormy storm...@stormy.ca wrote:

At 08:40 PM 1/3/2015 -0500, ghalvor...@hushmail.com wrote:
[snip]
I'm not sure why these two behave differently (www.example.com vs 
example.com) I always thought the extra four letters were 
something that 
Apache knew how to deal with.  It's hard to guarantee that the 
user will 
user type or omit the 'www.'  What should be done about this?

ServerAlias ?

It was undefined.  I thought I would implement it according to online 
documentation.  I retyped an equivalent excerpt from my sites-available 
directory.

ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/example.com/ht-docs/

When I perform the telnet 80 test, I get a 501 Not Implemented, but the wget 
command pulls the index.html correctly.  I never trust a web browser when 
diagnosing a web page because they like to cache web files.  I used telnet to 
simulate a web browser request, as explained in a blog, but it is apparently 
wrong...

This is the offending article I used, by the way.

http://www.the-art-of-web.com/system/telnet-http11/



Best -- Paul 


---
--
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Virtual Hosting: One website doesn't work.

2015-01-02 Thread Eric Covener
On Fri, Jan 2, 2015 at 7:52 PM,  ghalvor...@hushmail.com wrote:
 But there is one site that is does not load at all:

 $ telnet example.com 80
 Trying 104.236.25.70...
 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-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org