[svlug] Best way apache and firefox...

Marco Walther marco at sonic.net
Fri Nov 7 19:44:15 PST 2014


On 11/07/2014 07:16 PM, Jesse Monroy wrote:
> You might need to:
>
> chmod +x for the directory, not the files
Yes, make sure, the Apache user can read (and traverse) the complete 
path to your files. That's probably the first step.

The next is, make sure, you grant the right permissions on your new 
directory (in the apache config). Otherwise, Apache will deny access as 
well.

Some time ago, I set up a little deb repository for myself. It's 
reachable @ http://packages.baffw.bytesalad.org/ , not that the contents 
is of any importance here;-) The configuration for that (on an Ubuntu 
14.04.1 host) looks like:

root at www:/etc/apache2/sites-enabled# cat 003-baffw-packages.conf
# NameVirtualHost *
<VirtualHost *:80>
         DocumentRoot /var/baffw/packages
         ServerName packages.baffw.bytesalad.org:80
         <Directory />
                 Options FollowSymLinks
                 AllowOverride None
         </Directory>
         <Directory /var/baffw/packages>
                 Options Indexes FollowSymLinks MultiViews Includes
                 AllowOverride None
                 Require all granted
         </Directory>
         <DirectoryMatch db>
                 Order allow,deny
                 Deny from all
         </DirectoryMatch>
         <DirectoryMatch conf>
                 Order allow,deny
                 Deny from all
         </DirectoryMatch>

         <IfModule autoindex_module>
                 IndexIgnore conf db HEADER.html FOOTER.html
                 HeaderName HEADER.html
                 ReadmeName FOOTER.html
         </IfModule>
</VirtualHost>

I have a little HEADER.html file which is responsible for the text above 
the directory listing:

root at www:/var/baffw/packages# cat HEADER.html
<p>Add this repository to your system:</p>
<ul>
   <li>$ sudo wget -O /etc/apt/sources.list.d/baffw.marco.list 
http://packages.baffw.bytesalad.org/marco.list</li>
   <li>$ sudo wget -O - 
http://packages.baffw.bytesalad.org/marco.gpg.key | apt-key add -</li>
   <li>$ sudo apt-get update</li>
   <li>$ sudo apt-get install &lt;whatever package&gt;</li>
</ul>

No FOOTER.html, so you get the Apache default.

I hope, that helps you a little bit. For your Aliases, you will still 
need similar Directory configs.

-- Marco

>
> Jesse
>
> On 11/7/14, Michael Robinson <plug_1 at robinson-west.com> wrote:
>> I'm trying to link my vsftpd archive of firefox to my Apache web server.
>> So far, I have tried:
>>       alias /firefox /var/ftp/pub/windows/Internet/firefox
>>
>> I'm running Apache-2.4.10 by the way.
>>
>> Testing that, I get a 403 Access Forbidden error.
>>
>> [Fri Nov 07 18:16:34.210271 2014] [authz_core:error] [pid 31966:tid
>> 139793851655936] [client 192.168.5.89:43596] AH01630: client denied by
>> server configuration: /var/ftp/pub/windows/Internet/firefox/
>>
>>
>> [root at web windows]# ls -lR firefox/
>> firefox/:
>> total 276264
>> -r--r--r--. 1 admin admin 16157992 Apr  1  2012 Firefox Setup 11.0.exe
>> -r--r--r--. 1 admin admin  5161024 Feb 21  2009 Firefox Setup
>> 1.5.0.12.exe
>> -r--r--r--. 1 admin admin 19381840 Dec  6  2012 Firefox Setup 17.0.1.exe
>> -r--r--r--. 1 admin admin 20564720 Mar 25  2013 Firefox Setup 19.0.2.exe
>> -r--r--r--. 1 admin admin  6048152 Feb 21  2009 Firefox Setup
>> 2.0.0.20.exe
>> -r--r--r--. 1 admin admin 21041840 Apr  6  2013 Firefox Setup 20.0.exe
>> -r--r--r--. 1 admin admin 21289608 Jun 15  2013 Firefox Setup 21.0.exe
>> -r--r--r--  1 admin admin 22416432 Sep 14  2013 Firefox Setup 23.0.1.exe
>> -r--r--r--  1 admin admin 22710720 Sep 29  2013 Firefox Setup 24.0.exe
>> -r--r--r--. 1 admin admin  7526856 May 14  2009 Firefox Setup 3.0.10.exe
>> -r--r--r--. 1 admin admin  7521112 Feb 21  2009 Firefox Setup 3.0.6.exe
>> -r--r--r--  1 admin admin 32239888 Aug 11 19:30 Firefox Setup 31.0.exe
>> -r--r--r--  1 admin admin 36445280 Nov  4 21:22 Firefox Setup 33.0.2.exe
>> -r--r--r--. 1 admin admin  8086544 Dec 25  2009 Firefox Setup 3.5.6.exe
>> -r--r--r--. 1 admin admin  8539024 Sep 14  2010 Firefox Setup 3.6.9.exe
>> -r--r--r--. 1 admin admin 13683064 Jun 30  2011 Firefox Setup 5.0.exe
>> -r--r--r--. 1 admin admin 14045800 Nov  2  2011 Firefox Setup 7.0.1.exe
>> [root at web windows]#
>>
>> Apache is being run as user apache and group apache.
>>
>> What I want is a listing of these firefox installers where the programs
>> will download when clicked on.  Is there a simple way to generate an
>> html page on the fly for this directory?
>>
>> Since I compiled Apache from source, Apache 2.2 is a bit old, I don't
>> have an init script for it.  I have been manually doing apachectl start.
>> This is a CentOS 6.x based server, so it is pre systemd.
>>
>> Any insight on the 403 error and how to resolve that very much
>> appreciated.  I also appreciate any help getting a script that will
>> start Apache at boot and shut it down in the event of a shutdown.
>>
>> As a bonus, it would be nice to detect when the OS is Linux and send
>> folks to a web page or maybe to the mozilla download site for firefox.
>>
>>
>> _______________________________________________
>> svlug mailing list
>> svlug at lists.svlug.org
>> http://lists.svlug.org/lists/listinfo/svlug
>>
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug





More information about the svlug mailing list