Jump to content

Apache 22 vhosts


joolzhaines

Recommended Posts

Hi,

 

I am running apache 22 on Windows 2003, I have 10 domains which up to now I have been using host names to resolve which is working, I have recently been given five TCP/IP numbers and I want to secure one site with SSL. I have set my DNS server on all but one domain to use the same internet IP number and one to use its own IP number which I want to secure, if I change the host file as below

 

<VirtualHost 80.xxx.xxx.xxx>

ServerAdmin [email protected]

ServerName  mydomain.co.uk

DocumentRoot /www/vhosts/www.mydomain.co.uk

ErrorLog    /www/vhosts/www.mydomain.co.uk/logs/error.log

</VirtualHost>

 

Instead of this the old way

 

<VirtualHost *:80>

ServerAdmin [email protected]

ServerName  mydomain.co.uk

DocumentRoot /www/vhosts/www.mydomain.co.uk

ErrorLog    /www/vhosts/www.mydomain.co.uk/logs/error.log

</VirtualHost>

 

When I change to using an IP I cannot resolve to the web site anymore? What am I doing wrong, is this correct for securing with SSL, my router is passing all numbers correctly.

 

Thanks for your help

Joolz

 

 

Link to comment
https://forums.phpfreaks.com/topic/119909-apache-22-vhosts/
Share on other sites

Hi,

 

Here is the vhost file, when I change the 2nd host to use an TCP both address route to the first www.joolz.info domain, both hosts resolve to the correct TCP/IP so it must be something to do with apache not recognizing/resolving the TCP and defaulting to www.joolz.info

 

#

# Virtual Hosts

#

# If you want to maintain multiple domains/hostnames on your

# machine you can setup VirtualHost containers for them. Most configurations

# use only name-based virtual hosts so the server doesn't need to worry about

# IP addresses. This is indicated by the asterisks in the directives below.

#

# Please see the documentation at

# <URL:http://httpd.apache.org/docs/2.2/vhosts/>

# for further details before you try to setup virtual hosts.

#

# You may use the command line option '-S' to verify your virtual host

# configuration.

 

#

# Use name-based virtual hosting.

#

 

# Tried with and without this line

# NameVirtualHost *:80

 

# Default Virtual Host --> \www\vhosts\localhost

#

# This Virtual Host serves two functions:

# 1) As the VH for http://localhost

# 2) As the default VH for all unknown hosts that resolve to this server

#

# Do not remove/edit this VH unless you know exactly what you are doing.

# Note that this should be the 1st VH Apache parses from the configuration files.

# Note that permissions for this VH's DocumentRoot are taken from httpd.conf

 

<VirtualHost *:80>

ServerName  joolz.info

ServerAlias www.joolz.info

DocumentRoot /www/vhosts/www.joolz.info

ErrorLog    /www/vhosts/www.joolz.info/logs/error.log

<Directory "/www/vhosts/www.joolz.info">

Options All

AllowOverride All

order allow,deny

allow from all

</Directory>

</VirtualHost>

 

<VirtualHost 80.229.212.90:80>

ServerName  sussex-tennis.co.uk

ServerAlias www.sussex-tennis.co.uk

DocumentRoot /www/vhosts/www.sussex-tennis.co.uk

ErrorLog    /www/vhosts/www.sussex-tennis.co.uk/logs/error.log

<Directory "/www/vhosts/www.sussex-tennis.co.uk">

Options All

AllowOverride All

order allow,deny

allow from all

</Directory>

</VirtualHost>

 

 

### PLACE NEW VHs BLOCKS ___ONLY___ ABOVE THE DYNAMIC/MASS VH BLOCK ###

### PLACE NOTHING BELOW THIS VH BLOCK OR LINE ###

Link to comment
https://forums.phpfreaks.com/topic/119909-apache-22-vhosts/#findComment-619128
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.