Jump to content

Web Server Problem...


giroeneleje
 Share

Recommended Posts

Hello.

 

I am still kinda new to linux, and I've just now encountered a small problem.

I have installed Mandrake 10.1, and all the software I have came installed with it.

This is my problem:

I have 2 domain names registered to the same ip(my mandrake server)

my websites are set up like this:

/var/www/html/WEBSITE1 - website 1

/var/www/html/WEBSITE2 - website 2

 

now I want www.domainname.com to point to website 1

and www.domainname2.com to point to website 2

but i dont want to use the "redirect to url" option in the domainregistration website because it wont look that good.

I want to use to redirect to ip option.

So i found a cgi script that you can put in your / directory and it will redirect to a higher directory depending on what domainname u used to get there.

The problem is, the script wont run in the /html/ directory for some strange reason that i dont know.

Is there any way to fix this?

By the way, the server software is apache, the one that comes with Mandrake 10.1

 

Thank you....

Link to comment
Share on other sites

You don't need to do that. Many servers including my own have several domains registered to the same IP.

Just set up website 2 as a virtual_domain. Your Apache config file gives you tips on how to achieve this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...