Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-04-2006, 02:22 PM
|
#1
|
Member
Registered: Feb 2004
Distribution: SLES 9
Posts: 112
Rep:
|
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.
|
|
|
05-04-2006, 02:36 PM
|
#2
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
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...
|
|
|
05-04-2006, 03:24 PM
|
#3
|
Member
Registered: Feb 2004
Distribution: SLES 9
Posts: 112
Original Poster
Rep:
|
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.
|
|
|
05-04-2006, 04:20 PM
|
#4
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
You might browse through the apache documentation. Here's the page on "Mapping URLs to Filesystem Locations"
|
|
|
05-05-2006, 11:10 AM
|
#5
|
Member
Registered: Feb 2004
Distribution: SLES 9
Posts: 112
Original Poster
Rep:
|
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?
|
|
|
05-05-2006, 01:10 PM
|
#6
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
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!)...
|
|
|
05-05-2006, 01:36 PM
|
#7
|
Member
Registered: Feb 2004
Distribution: SLES 9
Posts: 112
Original Poster
Rep:
|
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.
|
|
|
05-12-2006, 09:50 AM
|
#8
|
Member
Registered: Jan 2006
Distribution: RHEL3
Posts: 97
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 09:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|