LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 07:45 PM   #1
compused
Member
 
Registered: Oct 2006
Location: Melbourne Australia
Distribution: centos and redhat 8
Posts: 91

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, 08: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, 06:13 AM   #3
compused
Member
 
Registered: Oct 2006
Location: Melbourne Australia
Distribution: centos and redhat 8
Posts: 91

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



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 12:38 PM
Apache DocumentRoot not display my files kitek Linux - Server 3 11-27-2007 01:49 PM
Apache won't display files in DocumentRoot PiGuy Linux - Newbie 6 01-21-2005 01:33 PM
Apache serving from unexpected DocumentRoot location Javadude Linux - Newbie 2 08-24-2003 07:51 AM

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

All times are GMT -5. The time now is 06:05 PM.

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