httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tushar Chavan <>
Subject [users@httpd] One Apache ( having two hostname but one IP ) for two websites
Date Tue, 26 Apr 2011 08:30:34 GMT

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,
View raw message