LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 05-04-2006, 02:22 PM   #1
Harry Seldon
Member
 
Registered: Feb 2004
Distribution: SLES 9
Posts: 112

Rep: Reputation: 15
Apache default page redirect


I have a server whose document root is /var/www/html. The default site for the system is in /var/www/html/intranet. I have other sites located in the document root that I need to get to. What I'd like to do is leave the document root at /var/www/html but have the site automatically put people in ./intranet. The server I'm migrating off somehow has this configured but I can't puzzle it out. There are no virtual hosts set up. Any help would be appreciated.
 
Old 05-04-2006, 02:36 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
have you tried just making a symbolic link?

ln -s /var/www/html/intranet/index.html /var/www/html/index.html

Just change "index.html" to whatever your root page for that particular site is. I'm assuming of course that the other sites are named something different...
 
Old 05-04-2006, 03:24 PM   #3
Harry Seldon
Member
 
Registered: Feb 2004
Distribution: SLES 9
Posts: 112

Original Poster
Rep: Reputation: 15
I gave it a try, but without permanently redirecting the link, I get none of the images and the links on the page all get the object not found error. In a pinch, I can move the other sites under the intranet site but I'd rather not, especially since there must be some way to do this as it's set up that way on the old production server. Plus, I can do it under IIS so I'm assuming it can be done here with the right kungfu.
 
Old 05-04-2006, 04:20 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You might browse through the apache documentation. Here's the page on "Mapping URLs to Filesystem Locations"
 
Old 05-05-2006, 11:10 AM   #5
Harry Seldon
Member
 
Registered: Feb 2004
Distribution: SLES 9
Posts: 112

Original Poster
Rep: Reputation: 15
The Redirect directive looks like what I need but I don't know where to put it. I don't have a mod_alias conf file. There doesn't appear to be a mod_alias install mod. I found an alias subsection in the default-server.conf under /etc/apache2; do I just add the Redirect line in this section or somewhere in this file?
 
Old 05-05-2006, 01:10 PM   #6
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Sorry, I'm no expert so your guess is as good as mine. But there's only a couple of config files I'm aware of for apache and they should all be in the /etc/apache2 directory I believe.

You can see if mod alias is installed by typing apache2 -l (that's L). It's probably already compiled in.

On Debian, it looks like the main config file is apache2.conf. There is also a readme in this directory that might help you out. Or try google. Sorry I can't be more help. I've only used apache for basic webserving (i.e. testing my website before uploading it to our ISP's server -- we get 20MB, woohoo!)...
 
Old 05-05-2006, 01:36 PM   #7
Harry Seldon
Member
 
Registered: Feb 2004
Distribution: SLES 9
Posts: 112

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pljvaldez
Sorry, I'm no expert so your guess is as good as mine. But there's only a couple of config files I'm aware of for apache and they should all be in the /etc/apache2 directory I believe.

You can see if mod alias is installed by typing apache2 -l (that's L). It's probably already compiled in.

On Debian, it looks like the main config file is apache2.conf. There is also a readme in this directory that might help you out. Or try google. Sorry I can't be more help. I've only used apache for basic webserving (i.e. testing my website before uploading it to our ISP's server -- we get 20MB, woohoo!)...
That's ok. I'm farther along than I was so at least I'm heading in the right direction down what I hope is the right path. I'll get this mug figured out and post whatever voodoo it took to make it work here. Thanks for all your help.
 
Old 05-12-2006, 09:50 AM   #8
Skip-DMP
Member
 
Registered: Jan 2006
Distribution: RHEL3
Posts: 97

Rep: Reputation: 15
Forwarding?

I am seeking a similar answer. Actually, I am trying to set my system up with multiple sites running on my system where each domain resides in its own directory. I have found the section in Tomcat to do it, but haven't gotten the configuration quite right... I believe (maybe I am wrong) that the two can work in conjunction with each other for the purpose you are trying to accomplish. I am an expert in neither, but could surely use a solution as well.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Apache 2 Page linutzy Linux - Newbie 7 08-02-2005 08:18 PM
Apache default page dienerk Linux - General 4 10-22-2004 02:02 PM
I cant change the default test page in apache server to add my page.y nhemapriya Linux - Newbie 3 05-13-2004 01:35 PM
Apache default page?? andy18 Linux - General 6 07-16-2003 03:57 AM
apache default page davee Linux - Newbie 6 02-17-2003 10:46 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 09:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration