LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-17-2007, 08:01 PM   #1
kitkit201
LQ Newbie
 
Registered: Sep 2006
Posts: 6

Rep: Reputation: 0
Apache Alias Samba share to a Windows box


Hi All

I am trying to host some large jpg files on my windows filebox. I am currently using Apache 2.0.52-9 in RH Enterprise 6 as my webserver.

What I have been trying to do today was to create a Samba share from the RedHat box to the Windows box.

In terminal I typed in
Quote:
smbmount //10.4.0.199/jpgfiles /mnt/windozebox/jpgfiles -o username=administrator,password=blahblah,uid=apache,gid=apache
And can mount just fine. All the files in my Samba mount are owned by apache, both user and group.

Now, in my httpd.conf file in Apache, I have the httpD running user and group running as apache.

In my httpd.conf file, I have a line

Quote:
Alias /Pictures /mnt/windozebox/jpgfiles
But when I bring up http://localhost/Pictures it gives me an error that says Permission denied.

Anyone have an idea on what I am doing wrong here?

Thanks
Kit
 
Old 04-18-2007, 08:57 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,464

Rep: Reputation: 450Reputation: 450Reputation: 450Reputation: 450Reputation: 450
Hi

You also need to give permission - a typical Apache setup gives everyone access to /var/www/html or something, and denies access to anything else.

Try to add this in your httpd.conf:

Code:
<Directory /mnt/windozebox/jpgfiles>
   Options Indexes FollowSymLinks MultiViews
   Order allow,deny
   allow from all  
</Directory>
Because of this, I think it's often a lot easier to just use symlinks instead of Alias in httpd.conf. Kind of like this:
Code:
ln -s /mnt/windozebox/jpgfiles /var/www/Pictures

Last edited by Guttorm; 04-18-2007 at 08:58 AM.
 
Old 04-18-2007, 07:11 PM   #3
kitkit201
LQ Newbie
 
Registered: Sep 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Guttorm
Hi

You also need to give permission - a typical Apache setup gives everyone access to /var/www/html or something, and denies access to anything else.

Try to add this in your httpd.conf:

Code:
<Directory /mnt/windozebox/jpgfiles>
   Options Indexes FollowSymLinks MultiViews
   Order allow,deny
   allow from all  
</Directory>
Because of this, I think it's often a lot easier to just use symlinks instead of Alias in httpd.conf. Kind of like this:
Code:
ln -s /mnt/windozebox/jpgfiles /var/www/Pictures

Thanks for the help Guttorm. Actually both the Alias method and the link method you said works just fine.

The problem was SELinux. When I installed RH EL4 with the Dell openmanage (I normally just install it with the RH cds), but SELinux is enabled by default. Disabling it and rebooting it solved my problem!

Thank
 
  


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
Share Internet from Windows XP box?? general2000vn Linux - Networking 3 04-18-2005 07:58 PM
acces windows share from my linux box jb_jauvin Slackware 6 03-30-2005 09:00 PM
windows share automatically mount on linux box emailssent Linux - Networking 11 11-01-2004 04:02 AM
Apache alias point to mounted windows share johnnypezz Linux - Newbie 0 09-13-2004 03:04 PM
Browsing Samba share from another linux box FiveFlat Linux - Software 3 01-13-2004 03:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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