Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How can I redirect a page?

Posted on 2001-08-28
6
Medium Priority
?
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 1

Accepted Solution

by:
larry718 earned 200 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month12 days, 6 hours left to enroll

636 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