Solved

How can I redirect a page?

Posted on 2001-08-28
6
189 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
Comment Utility
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
Comment Utility
hi
I didn't get a perfect answer

Harish
0
 

Author Comment

by:hkg
Comment Utility
hi
I didn't get a perfect answer

Harish
0
 
LVL 15

Expert Comment

by:samri
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now