Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redhat 9 HTTP Name Based Virtual Hosting 1

Status
Not open for further replies.

rsol1234

Technical User
Feb 22, 2005
2
US
I have a dynamic IP Address which is updated with script. So what IP address do i put in the Apache Name based Virtual host GUI? What IP address do i put for configuring my DNS GUI for the other domains if it changes every once in a while?
 
I infer from your saying "a dynamic address" that you only have one address bound to the NIC on the server. Just use the "*" wildcard:

<VirtualHost *>
.
.
.
</VirtualHost>



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Also take a look at 'NameVirtualHost' in the docs.

. Mac for productivity
.. Linux for developement
... Windows for solitaire
 
This is what i have in my httpd.conf i still get test page.
I would like to know where I would add the domain names for DNS. I have tried the HOST TAB on my network setting but it does not allow for "*".

# Use name-based virtual hosting.
#
NameVirtualHost 69.155.240.19
# Where do we put the lock and pif files?
LockFile "/var/lock/httpd.lock"
CoreDumpDirectory "/etc/httpd"
# Defaults for virtual hosts
# Logs
#
# Virtual hosts
#
# Virtual host Default Virtual Host
<VirtualHost *>
DocumentRoot /var/ ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel debug
HostNameLookups off
</VirtualHost>

# Virtual host Virtual Host 0
<VirtualHost *>
DocumentRoot /var/ ServerName site1.net
ServerSignature email
</VirtualHost>

# Virtual host Virtual Host 1
<VirtualHost *>
DocumentRoot /var/ ServerName site2.com
ServerSignature email
</VirtualHost>

# Virtual host Virtual Host 2
<VirtualHost *>
DocumentRoot /var/ ServerName site3.com
ServerSignature email
</VirtualHost>

# Virtual host Virtual Host 3
<VirtualHost *>
DocumentRoot /var/ ServerName site4.us
ServerSignature email
</VirtualHost>
 
Try like this or similiar.

NameVirtualHost domain.com
<VirtualHost *:80>
ServerName domain
ServerAlias domain.com ...
</VirtualHost>


. Mac for productivity
.. Linux for developement
... Windows for solitaire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top