LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-13-2012, 08:45 PM   #1
compused
Member
 
Registered: Oct 2006
Location: Melbourne Australia
Distribution: centos and redhat 8
Posts: 83

Rep: Reputation: 15
Apache: Serving files Outside the set DocumentRoot Path


Hi
DocumentRoot is defined in the main apache config file:
Code:
DocumentRoot "/share/Web"
But I am wanting to serve files via virtual host on port 104, from a different path to DocumentRoot, ie:
Code:
/share/MD0_DATA/server_dir
So this is what I have...something is causing a 403 error?
Code:
<VirtualHost *:104>
	ServerName my_server
	DocumentRoot "/share/MD0_DATA/server_dir"
#
Alias / "/share/MD0_DATA/server_dir"
#
<Directory "/share/MD0_DATA/server_dir">
	Options FollowSymLinks MultiViews
	AllowOverride All
	Order allow,deny
	Allow from all
</Directory>
</VirtualHost>
Thanks
Compfused
 
Old 03-13-2012, 09:13 PM   #2
verigoth
Member
 
Registered: May 2002
Posts: 179

Rep: Reputation: Disabled
403 error could mean a few things. Is there an index.html file in there?
Does the web server have permission to access that folder? (i.e. same owner/group as /share/Web owns /share/MD0_DATA/server_dir)
 
Old 03-14-2012, 07:13 AM   #3
compused
Member
 
Registered: Oct 2006
Location: Melbourne Australia
Distribution: centos and redhat 8
Posts: 83

Original Poster
Rep: Reputation: 15
This worked for me; I did not need the Alias setting at all even though the DocumentRoot for port 80 was /share/web ie totally different:
Code:
<VirtualHost *:104>
	ServerName my_server
	DocumentRoot "/share/MD0_DATA/server_dir"
#
#
<Directory "/share/MD0_DATA/server_dir">
	allow from all
        Options +Indexes
</Directory>
</VirtualHost>
 
  


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
Apache not serving newly added files or php. theboomboomcars Linux - Server 4 08-16-2008 01:38 PM
Apache DocumentRoot not display my files kitek Linux - Server 3 11-27-2007 02:49 PM
Apache won't display files in DocumentRoot PiGuy Linux - Newbie 6 01-21-2005 02:33 PM
Apache serving from unexpected DocumentRoot location Javadude Linux - Newbie 2 08-24-2003 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:49 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