Solved

How can I redirect a page?

Posted on 2001-08-28
6
192 Views
Last Modified: 2010-03-04
hi
if i had a server and for eg www.mydomain.com is running in that server under apache and tomcat and I 'm using java servlets.so now the index.html under apache is mydomain's home page.If I need to add one more site in that server, foe eg www.yourdomain.com what all things I have to do?
I have some more question?
Whether I can keep index.html and do something inside that or Do I have to change some configuration in httpd config?

Thanks

Harish
0
Comment
Question by:hkg
  • 2
6 Comments
 
LVL 1

Accepted Solution

by:
larry718 earned 50 total points
ID: 6436803
You need to set up a virtual host to have 2 or more domain names in one server.

http://httpd.apache.org/docs/vhosts/index.html

check out "Using name-based virtual hosts"


...
    NameVirtualHost 111.22.33.44

    <VirtualHost 111.22.33.44>
    ServerName www.domain.tld
    DocumentRoot /www/domain
    </VirtualHost>

    <VirtualHost 111.22.33.44>
    ServerName www.otherdomain.tld
    DocumentRoot /www/otherdomain
    </VirtualHost>
...

if this doesn't work, substitute


    NameVirtualHost *
    <VirtualHost *>
    ServerName www.domain.tld
    DocumentRoot /usr/local/apache/htdocs/www/domain
    </VirtualHost>

    <VirtualHost *>
    ServerName www.otherdomain.tld
    DocumentRoot /usr/local/apache/htdocs/www/otherdomain
    </VirtualHost>


Have fun!

0
 

Author Comment

by:hkg
ID: 6468243
hi
I didn't get a perfect answer

Harish
0
 

Author Comment

by:hkg
ID: 6468244
hi
I didn't get a perfect answer

Harish
0
 
LVL 15

Expert Comment

by:samri
ID: 7250973
Harish,

The question is pending delete since you are not getting a good answer.

TO me what has been suggested by Larry is kinda good enough -- maybe do you prefer must detailed explanation?

DO you still need assistance on this?

SHould you insist on the delete to proceed, you can drop a 0-pts question in Community Support, and request for a deletion.

If you still require assistance, please respond.

cheers.
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question