httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Love" <>
Subject Re: [users@httpd] One Apache ( having two hostname but one IP ) for tw o websites
Date Wed, 27 Apr 2011 00:19:33 GMT
I have MULTIPLES all listening on port 80. They ALL work via apache... I just INCLUDE their
specific configuration differences, and it finds the right one, by name. I've been doing this
for years. I can give you an example if you like.  See us online at

---------- Original Message ----------
From: Tushar Chavan <>
To: <>
Subject: [users@httpd] One Apache ( having two hostname but one IP ) for two websites
Date: Tue, 26 Apr 2011 14:00:34 +0530

Hi Experts,
We are using one Apache server ( two hostnames but one IP )  for two websites (
& )
Apache Hostnames :- Apache_host_1 & Apache_host_2 with same IP.
Web Sites 1 :- 
Web Sites 2 :-
We are using one apche server listening on two ports 80 & 443.
 1.  when I type http://Apache_host_1/irj  , it properly re-direct to
 2.  When I type https://Apache_host_2/irj , it properly re-direct  to
 3.  Now problem is but when I type http://Apache_host_2/irj , re-directs to
. We need to re-direct this      to 
     ( This is because users may bot type https. Can you please give me a hint to fix this
It is because , both Apache_host_1 & Apache_host_2 have same IP address.So http://Apache_host_2/irj
qualifies for <VirtualHost  Apache_host_1:80>
Below is my configuration in httpd.conf
Listen Apache_host_1:80
NameVirtualHost directive
NameVirtualHost  Apache_host_1:80
<VirtualHost Apache_host_1:80>
ProxyPass          /irj
ProxyPassreverse   /irj
ServerName  Apache_host_1:80
Configuration in httpd-ssl.conf
Listen Apache_host_2:443
NameVirtualHost directive
NameVirtualHost  Apache_host_2:443
<VirtualHost Apache_host_2:443>
ProxyPass              /irj
ProxyPassreverse   /irj
RequestHeader set ClientProtocol https
Redirect permanent  /irj   https://Apache_host_2/irj
ServerName  Apache_host_2:443
Best Regards,
Groupon&#8482 Official Site
1 ridiculously huge coupon a day. Get 50-90% off your city&#39;s best!
View raw message