Solved

How can I redirect a page?

Posted on 2001-08-28
6
190 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DNS Question 7 61
setting up tomcat for external access 4 69
Htaccess - if subdomain "dev." 2 74
Apache / XAMPP  authorisation 10 44
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). #…
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 …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

914 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

16 Experts available now in Live!

Get 1:1 Help Now