|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Virtual Hosts With Apache
I am just wondering how to make seperate virtual hosts with apache. I am sorry if this is listed on the site somewhere else.
|
|
#2
|
||||
|
||||
|
RE: Virtual Hosts With Apache
See section 3 of the httpd.conf file.
NameVirtualHost *:80 <VirtualHost *> ServerName www.example.com DocumentRoot /www/web/example </VirtualHost> <VirtualHost *> ServerName www.virtual.com DocumentRoot /www/web/virtual </VirtualHost> |
|
#3
|
|||
|
|||
|
RE: Virtual Hosts With Apache
thanks, simpiler than i thought
|
|
#4
|
||||
|
||||
|
RE: Virtual Hosts With Apache
I forgot.. there's also a tutorial written by PostalCow in the tutorial section! www.codewalkers.com/tutorials/23/1.html.
-Tim |
|
#5
|
|||
|
|||
|
RE: Virtual Hosts With Apache
ok one more thing, how do you do subdomains?
|
|
#6
|
|||
|
|||
|
RE: Virtual Hosts With Apache
With another virtual host entry.
|
|
#7
|
|||
|
|||
|
RE: Virtual Hosts With Apache
no I meant like test.google.com or can you do subdomains like that with a virtual host?
|
|
#8
|
||||
|
||||
|
RE: Virtual Hosts With Apache
If they're pointing to the same machine, you'll have to first set up virtual hosts
<VirtualHost *> ServerName www.example.com ServerAlias example.com DocumentRoot /www/web/example </VirtualHost> <VirtualHost *> ServerName sub.example.com DocumentRoot /www/web/sub </VirtualHost> and then set up A Name records for your DNS -Tim |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > Virtual Hosts With Apache |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|