Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

strange virtual host problem

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
Strange problem with virtual hosts - Hi! I'm going mad. Really. All the day working on apache but it still does not want to do its job ... I have the (Unix) Debian GNU/Linux Kernel 2.4.18 ----- 8< ----- [...] ..

Virtual Host Problem - OK I have a web server that up until now served 1 web page. However the company needed to expand and needed to add a few other sites to handle customers and So I added a few virtual host sections for the new sites. I also the old..

virtual host problem - hi all i have add a virtual host in when i try to visit the url from the web all images's path point to how can i point image path to without change href from to tnx

[2.0.40] Virtual Host Authentication Problem - works okay for normal document root. Its just for virtual host that the does not activate. I setup as follows: o created passwd file using htpasswd command o copied .htaccess to virtual host docroot are..

apache2 virtual host problem - Hi A while ago I did a small site to display from family in England (mostly to see some since I didn't get to go). Anyway, my ISP in addition to providing DNS pointing to my small..
Next:  Apache: Forbidden!! You don't have permission to access / on this ..  
Author Message
davidoe

External


Since: Mar 14, 2004
Posts: 2



(Msg. 1) Posted: Sun Mar 14, 2004 11:15 pm
Post subject: strange virtual host problem
Archived from groups: alt>apache>configuration (more info?)

Hi,

I have a - what I think strange - virtual host problem. I do have a web
server set up that uses ssl. Now I want to reroute the incoming requests to
the https://. In order to do so I used Rewrite. My virtual hosts are
configured somehow like that:

<VirtualHost www.name1.tld1:80>
ServerName www.name1.tld1
RewriteCond {SERVER_PORT} ^80$
RewriteRule /.* https://%{SERVER_NAME}/$1
</VirtualHost>

This seems to work - except for one thing. I do have several top level
domain names for different countries (e.g. tld1 = .com, tld2 = .ch) and I
still want to distinguish the origin of the request based on the domain it
came from, in order to customize the pages.
Even though I do have several virtual hosts set up it accesses always the
firt one if the top level domain differs but the domain name is the same
(e.g. www.name1.tld1 and www.name1.tld2). Once it accesses the first
virtual host it sets the server name to the one named for the first virtual
host, even though the request came from a different domain name.

Well, it doesn't enter the first virtual host configuration if the url has a
different name (e.g. www.name2.tld1)

Hope you understand what I try to describe.

Thanks in advance for all your help.

david

 >> Stay informed about: strange virtual host problem 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Mon Mar 15, 2004 9:26 am
Post subject: Re: strange virtual host problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David <davidoe.TakeThisOut@gmx.net> wrote:
 > server set up that uses ssl. Now I want to reroute the incoming requests to
<font color=purple> > the <a style='text-decoration: underline;' href="https://.</font" target="_blank">https://.</font</a>>


Why fool around with rewrite?

<VirtualHost *:80>
<font color=purple>  ServerName <a style='text-decoration: underline;' href="http://www.....</font" target="_blank">www.....</font</a>>
<font color=purple>  Redirect / <a style='text-decoration: underline;' href="https://www....</font" target="_blank">https://www....</font</a>>
</VirtualHost>


 > still want to distinguish the origin of the request based on the domain it
 > came from, in order to customize the pages.

Good, I suggest you create different <VHost blocks>.
Davide

--
| Double your drive space: Delete Windows!
|
|
|<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: strange virtual host problem 
Back to top
Login to vote
davidoe

External


Since: Mar 14, 2004
Posts: 2



(Msg. 3) Posted: Tue Mar 16, 2004 12:01 am
Post subject: Re: strange virtual host problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I tried using redirect, but that caused an https-error in mod_ssl. I also
tried different virtualhost entries but it just took the first one and
seemed to ignore the ServerName entry.

Davide Bianchi wrote:

 > David <davidoe DeleteThis @gmx.net> wrote:
  >> server set up that uses ssl. Now I want to reroute the incoming requests
<font color=green>  >> to the <a style='text-decoration: underline;' href="https://.</font" target="_blank">https://.</font</a>>
 >
 >
 > Why fool around with rewrite?
 >
 > <VirtualHost *:80>
<font color=purple> > ServerName <a style='text-decoration: underline;' href="http://www.....</font" target="_blank">www.....</font</a>>
<font color=purple> > Redirect / <a style='text-decoration: underline;' href="https://www....</font" target="_blank">https://www....</font</a>>
 > </VirtualHost>
 >
 >
  >> still want to distinguish the origin of the request based on the domain
  >> it came from, in order to customize the pages.
 >
 > Good, I suggest you create different <VHost blocks>.
 > Davide
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: strange virtual host problem 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 4) Posted: Tue Mar 16, 2004 9:52 am
Post subject: Re: strange virtual host problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David <davidoe.RemoveThis@gmx.net> wrote:
 > I tried using redirect, but that caused an https-error in mod_ssl. I also
 > tried different virtualhost entries but it just took the first one and
 > seemed to ignore the ServerName entry.

That probably because it's not configured correctly. Search in the
old messages and in the documentation, there are many examples.

Davide

--
| Dennis Ritchie: "So fsck was originally called something else"
| Question: "What was it called?" Dennis Ritchie: Well, the second
| letter was different. --at Usenix
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: strange virtual host problem 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]