Forum Moderators: phranque

Message Too Old, No Replies

Virtual Hosts

I thought I was good at this

         

Phil44

9:43 pm on Apr 29, 2005 (gmt 0)

10+ Year Member



Hello

I have a good bit of experience with the Windows platform as well as formal schooling in DOS programming (Basic and the older hex programming Texas Instruments used).

The documentation with Apache is intended for experienced Apache users.

I am using version 2.0.54.

I have been able to get all the web sites working but still have the problem of not being able to get the server to recognize the URL with the www. in front of it.
The server will use the address of xyz.com but will not use the address of www.xyz.com. When the www. is used I get the default web site.

Any ideas?

Thanks

Phil

jdMorgan

11:08 pm on Apr 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Phil,

Welcome to WebmasterWorld!

Do you have a ServerAlias [httpd.apache.org] directive for www.example.com, in addition to the ServerName directive for example.com?

Jim

Phil44

12:06 pm on Apr 30, 2005 (gmt 0)

10+ Year Member



Hi

No the text file did not include that line.

Phil

Phil44

12:08 pm on Apr 30, 2005 (gmt 0)

10+ Year Member



I am back.

I have not been able to find how to “logoff” this message service?

Phil

Phil44

12:30 pm on Apr 30, 2005 (gmt 0)

10+ Year Member



Thank you JPMorgan for the suggestion.

It did not seem to help. Is there any prescribed order the text should be in?

Thanks

Phil

Phil44

1:22 pm on Apr 30, 2005 (gmt 0)

10+ Year Member



Hello JPMorgan

I found the problem. Section 2 under “UseCononicalName” must be turned on. Then you have to Make 2 <VirtualHost *:80> entries for the same web site. They are identical except for the www. in front of the site name.

Thanks again for your help.

Phil

[edited by: jdMorgan at 2:08 pm (utc) on April 30, 2005]
[edit reason] No sigs, please. See TOS. [/edit]

Phil44

5:17 pm on Apr 30, 2005 (gmt 0)

10+ Year Member



Hello

New problem.

How do I stop access to sub directories when they are appended to the URL?

Phil

jd01

8:34 pm on Apr 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure, because I can't see an example of what you are doing, but if it's happening on a rewrite you will need to add a blank query string (?) to the end of the new location.

RewriteRule ^somestuff\.html$ /morestuff.php? [L]

The ? followed by nothing should solve your problem if it is what I think you are asking.

Hope this helps.

Justin