- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HP-Apache Virtual Hosts on HP-UX
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2008 01:45 PM
тАО04-18-2008 01:45 PM
I want to configure HP-Apache for 3 sites using Virtual Hosts.
Say the sites are www.abc1.com, www.abc2.com and abc3.com ?
Can someone suggest me how to configure these ?
Thanks in advance,
Raj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2008 09:16 PM
тАО04-18-2008 09:16 PM
SolutionA. Setting up the system hosting Apache webserver.
There are two ways.
(i) Without changing DNS entries:
Edit the file /etc/hosts
Change:
192.168.1.1 yourserver yourserver.com
127.0.0.1 localhost loopback
To:
192.168.1.1 yourserver yourserver.com
192.168.1.1 foo www.abc2.com
192.168.1.1 bar www.abc3.com
127.0.0.1 localhost loopback
Edit the file /etc/nsswitch.conf
Change:
hosts: dns files
To:
hosts: files [NOTFOUND=continue] dns
The above will allow the system to look at your /etc/hosts file first for any machine-name and if it wasn't found there, lookup using the DNS.
(ii) Changing DNS entries
Edit your DNS lookup table to add:
192.168.1.1 foo www.abc2.com
192.168.1.1 bar www.abc3.com
B. Setting up the Apache webserver for name based virtual hosting on the same IP address.
In the file /opt/hpws/apache/conf/httpd.conf go to ├в Section 3: Virtual Hosts├в .
Add the following:
NameVirtualHost 192.168.1.1
DocumentRoot /opt/hpws/apache/htdocs-foo
ServerName www.abc2.com
DocumentRoot /opt/hpws/apache/htdocs-bar
ServerName www.abc3.com
To test the configuration enter
/opt/hpws/apache/bin/httpd -t -D DUMP_VHOSTS
You should see the text:
VirtualHost configuration:
192.168.1.1:80 is a NameVirtualHost
default server www.abc.com (/opt/hpws/apache/conf/httpd.conf:1299)
port 80 namevhost www.abc2.com (/opt/hpws/apache/conf/httpd.conf:1299)
port 80 namevhost www.abc3.com (/opt/hpws/apache/conf/httpd.conf:1304)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2008 10:18 PM
тАО04-18-2008 10:18 PM
Re: HP-Apache Virtual Hosts on HP-UX
-Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2008 10:30 PM
тАО04-18-2008 10:30 PM
Re: HP-Apache Virtual Hosts on HP-UX
The DNS or /etc/hosts should normally take care of the IP addresses. As far as possible use names and nothing to worry about in the configuration file ( /opt/hpws/apache/conf/httpd.conf )
Hope Ahsan ustad agrees with me...
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2008 11:46 PM
тАО04-18-2008 11:46 PM
Re: HP-Apache Virtual Hosts on HP-UX
Could U pls see the below URL site, I think so it will help full for U:-
http://www.hp.com/products1/unix/webservers/apache/faqs/
Thanks--Yaqub
I am a Customer Advocate!!!