Mailing List Archive

Vhosting problem
Hi, again!

We are using Apache here at work and the base has decided in their
infinite wisdom, to change the URL that we are using for our server. Now, we
are using now: mom.saia.af.mil and they are changing the url to
mom.kirtland.af.mil. How do we setup a virtual host so that Apache will
still respond to the original url AND the new url???

Thank in advance.

Robin E. Kopetzky - 'Sparky'
ACS/GSG - Software Development Specialist - SAS
Air Force Safety Center
Kirtland Air Force Center
9700 Avenue G SE #279A
Albuquerque, NM 87117-5670
(505) 853-7417
DSN 263-7417

"Human beings can always be counted on to assert with vigor their God-given
right to be stupid." - Dean Koontz in 'False Memory'

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: Vhosting problem [ In reply to ]
<VirtualHost *.*.*.*>
ServerName mom.saia.af.mil
DocumentRoot /your/data/root
other directives
</VirtualHost>

repeat and make sure to use the same docroot

-----Original Message-----
From: Kopetzky Robin CIV AFSC/SEP
[mailto:Robin.Kopetzky@kafb.saia.af.mil]
Sent: Thursday, December 13, 2001 3:13 PM
To: 'Apache users mail list'
Subject: Vhosting problem


Hi, again!

We are using Apache here at work and the base has decided in their
infinite wisdom, to change the URL that we are using for our server. Now, we
are using now: mom.saia.af.mil and they are changing the url to
mom.kirtland.af.mil. How do we setup a virtual host so that Apache will
still respond to the original url AND the new url???

Thank in advance.

Robin E. Kopetzky - 'Sparky'
ACS/GSG - Software Development Specialist - SAS
Air Force Safety Center
Kirtland Air Force Center
9700 Avenue G SE #279A
Albuquerque, NM 87117-5670
(505) 853-7417
DSN 263-7417

"Human beings can always be counted on to assert with vigor their God-given
right to be stupid." - Dean Koontz in 'False Memory'

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: Vhosting problem [ In reply to ]
Robin,
You will need to change the servername directive in the VirtualHost. If a
user requests the old site, then they will get the page and the URL will be
changed to the new site. You can also set up a page that says "This site has
been moved......". In the second case, you will need to set up a second
virtual host so there would be one for the old one and one for the new one.

Hope this helps.

Mark Nazzaro
eAssociate
Lucent Technologies
Phone: (908) 559-6105


-----Original Message-----
From: Kopetzky Robin CIV AFSC/SEP
[mailto:Robin.Kopetzky@kafb.saia.af.mil]
Sent: Thursday, December 13, 2001 4:13 PM
To: 'Apache users mail list'
Subject: Vhosting problem


Hi, again!

We are using Apache here at work and the base has decided in their
infinite wisdom, to change the URL that we are using for our server. Now, we
are using now: mom.saia.af.mil and they are changing the url to
mom.kirtland.af.mil. How do we setup a virtual host so that Apache will
still respond to the original url AND the new url???

Thank in advance.

Robin E. Kopetzky - 'Sparky'
ACS/GSG - Software Development Specialist - SAS
Air Force Safety Center
Kirtland Air Force Center
9700 Avenue G SE #279A
Albuquerque, NM 87117-5670
(505) 853-7417
DSN 263-7417

"Human beings can always be counted on to assert with vigor their God-given
right to be stupid." - Dean Koontz in 'False Memory'

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Vhosting problem [ In reply to ]
Kopetzky Robin CIV AFSC/SEP wrote:
>
> Hi, again!
>
> We are using Apache here at work and the base has decided in their
> infinite wisdom, to change the URL that we are using for our server. Now, we
> are using now: mom.saia.af.mil and they are changing the url to
> mom.kirtland.af.mil. How do we setup a virtual host so that Apache will
> still respond to the original url AND the new url???

I find the cleanest way to do this is to use the new URL in the main VH
and set up a small VH with the old URL. Then use a "RedirectMatch" to
move users to the new URL. The advantage of the RedirectMatch is that
the URL in the browser changes thus educating users that you have moved.
E.g.

NameVirtualHost ip-addr:80

# VH for old address
<VirtualHost ip-addr:80>
ServerName mom.saia.af.mil
RedirectMatch permanent (.*) http://mom.kirtland.af.mil$1
</Virtualhost>

# Main VH
<VirtualHost ip-addr:80>
ServerName mom.kirtland.af.mil
DocumentRoot <main-content-directory>
etc...
</Virtualhost>

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org