0% found this document useful (0 votes)
19 views1 page

Day 21 1 Webserver2 3

This document discusses configuring a virtual hosting environment on an HTTP server using port-based virtual hosting. The 3 sentences are: It describes installing the HTTP server package and configuring the /etc/httpd/conf/httpd.conf file to add NameVirtualHost and VirtualHost directives to serve two different domains from the same server IP address but different DocumentRoots. The configuration is completed by restarting the httpd service to load the new virtual host configuration.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Day 21 1 Webserver2 3

This document discusses configuring a virtual hosting environment on an HTTP server using port-based virtual hosting. The 3 sentences are: It describes installing the HTTP server package and configuring the /etc/httpd/conf/httpd.conf file to add NameVirtualHost and VirtualHost directives to serve two different domains from the same server IP address but different DocumentRoots. The configuration is completed by restarting the httpd service to load the new virtual host configuration.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Virtual Hosting Port based Configuration

Configuring HTTP Server

DNS DNS Server Server 192.168.0.253 192.168.0.253 server server Web Web Server Server 192.168.0.254 192.168.0.254

Install Installthe thepackage packageby byusing usingone oneof ofthe theinstallation installationmethods methods [root@comp1 rpm-ivh -ivh--force --force--aid --aid ftp://192.168.0.250/pub/Server/http* ftp://192.168.0.250/pub/Server/http* [root@comp1~]# ~]#rpm

www.zoom.com www.zoom.com

Linux Linux Client Client 192.168.0.1 192.168.0.1 client1 client1 ZOOM.COM ZOOM.COM

Windows Windows Client Client 192.168.0.2 192.168.0.2

www.redhat.com www.redhat.com 5000 5000

Open Openconfiguration configurationfor forediting editing [root@comp1~]# [root@comp1~]#vi vi etc/httpd/conf/httpd.conf etc/httpd/conf/httpd.conf

client2 client2

/etc/httpd/conf/httpd.conf

HTTP Server

Add Addthe thebelow belowlines lines NameVirtualHost *:80 NameVirtualHost *:80 <VirtualHost <VirtualHost*:80> *:80> ServerAdmin ServerAdmin root@zoom.com root@zoom.com DocumentRoot DocumentRoot /var/www/html /var/www/html ServerName www.zoom.com ServerName www.zoom.com DirectoryIndex DirectoryIndex zoom.html zoom.html </VirtualHost> </VirtualHost> <VirtualHost <VirtualHost*:80> *:80> ServerAdmin ServerAdmin root@ibm.com root@ibm.com DocumentRoot DocumentRoot /var/www/html /var/www/html ServerName www.ibm.com ServerName www.ibm.com DirectoryIndex DirectoryIndex ibm.html ibm.html </VirtualHost> </VirtualHost>

To Torestart restartthe theHTTP HTTPservices services [root@comp1 [root@comp1~]# ~]#service servicehttpd httpdrestart restart

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy