LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache Alias Samba share to a Windows box (https://www.linuxquestions.org/questions/linux-newbie-8/apache-alias-samba-share-to-a-windows-box-546891/)

kitkit201 04-17-2007 07:01 PM

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

Guttorm 04-18-2007 07:57 AM

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

kitkit201 04-18-2007 06:11 PM

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


All times are GMT -5. The time now is 05:42 AM.