Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Linux Operating System > Web/Security
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-27-2005, 06:40 PM   #1 (permalink)
redzone
Junior Member
 
Join Date: Jul 2005
Posts: 13
Default name based VirtualHost ?

Hello,

I am going to try setting up a name based VirtualHost in my httpd.conf file. What would a typical directive look like?

thanks
redzone is offline   Reply With Quote
Sponsored Links
Old 09-28-2005, 08:26 PM   #2 (permalink)
taylor
Junior Member
 
Join Date: Aug 2005
Posts: 28
Default

There are two parts to this. The first one is that you must issue a directive which gives Apache an IP address to serve the name based domains from. Like this:
PHP Code:
# If you want to use name-based virtual hosts you need to define at
           
   # least one IP address (and port number) for them.
           
   #
           
   
NameVirtualHost 12.34.56.78:80 
The second part is then to add the VirtualHost directives for each domain. Like this:
PHP Code:
# VirtualHost example (name based):
             
   # Almost any Apache directive may go into a VirtualHost container.
                
   #
              
   
<VirtualHost name.of.host.some_domain.com/>
              
   
ServerAdmin webmaster@host.some_domain.com
              
   DocumentRoot 
/www/docs/host.some_domain.com
              
   ServerName host
.some_domain.com/
             
   
ErrorLog logs/host.some_domain.com-error_log
            
   CustomLog logs
/host.some_domain.com-access_log common
         
   
</VirtualHost

This is just a basic outline there are many differnet ways to write your virtual host within your httpd file.
taylor is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:27 AM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums