LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Configuring Webalizer to report to a protected website folder (http://www.linuxquestions.org/questions/linux-software-2/configuring-webalizer-to-report-to-a-protected-website-folder-266987/)

soren625 12-16-2004 08:09 AM

Configuring Webalizer to report to a protected website folder
 
I am attempting to have Webalizer output its daily usage report to a folder called "usage/" on my public website that is password protected, but I get the "403 Forbidden" page when I try to access it.

Sorry if this post is a bit lengthy, but I am trying to include all the necessary information. I will try to organize it clearly ...

*** Here is the info from my httpd logs when I tried to access the folder: ***

access_log:

192.168.15.1 - - [15/Dec/2004:18:43:22 -0500] "GET /usage/index.html HTTP/1.1"
403 350 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111
Firefox/1.0"

error_log:

[Wed Dec 15 18:43:22 2004] [error] [client 192.168.15.1] client denied by server
configuration: /var/www/usage/index.html

*** Notice that the location here (/var/www/usage/index.html) is not the path to where my site is ***

*********************************

*** Here are (I think) the relevant sections of my http.conf file: ***

*** Virtual hosts section: ***

<VirtualHost *:80>
DocumentRoot /home/web/html

ServerAdmin *******@*******.net
ServerName host.domain.tldomain:80


ServerSignature email

DirectoryIndex index.php index.html index.htm index.shtml

<Directory "/home/web/html">
Options all

AllowOverride All
Allow from All

Order allow,deny

</Directory>


<Directory /home/web/html/usage>
AllowOverride AuthConfig

Allow from All
Order allow,deny
</Directory>

LogLevel debug
HostNameLookups off

</VirtualHost>


*** Directories section: ***

<Directory "/">
Deny from all


AllowOverride None

Order deny,allow

</Directory>

<Directory "/var/www/html">
Options Indexes

AllowOverride All
Allow from all

Order allow,deny
</Directory>


<Directory "/home/web/cgi-bin">
Options ExecCGI

AllowOverride All
Allow from all

Order allow,deny
</Directory>

<Directory /home/web/html/usage>
AllowOverride AuthConfig

Allow from All
Order allow,deny
</Directory>

********************************

*** .htaccess file (for /home/web/html/usage): ***

AuthUserFile /home/web/.htpasswd
AuthGroupFile /dev/null
AuthName "Family Site Admin"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>

********************************

*** .htpasswd file (in /home/web/) ***

Includes the user-name and encryption "hash" for the user name, but no password (Even when I "htpasswd -c .htpasswd {username}" and then type the password twice and all that).

********************************

I do have the OutputDir directive in the webalizer.conf file set to the correct path (/home/web/html/usage).

So, again, I am sorry for the length of the post, but if you can help me out I would be grateful. By the way, I did recently read something about adding to the webalizer.conf file:

#
# This configuration file maps the webalizer log analysis
# results (generated daily) into the URL space. By default
# these results are only accessible from the local host.
#
Alias /usage /var/www/usage

<Location /usage>
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.x.x
Allow from ::1
# Allow from .example.com
</Location>

....except I don't know what any of this means (like, "Allow from ::1," etc.). I have a feeling this has something to do with my problem, but I don't know how to set these options.

Thanks again!

soren625 12-16-2004 05:34 PM

I still don't know what is causing the forbidden error, but I do know that it's not the .htaccess or .htpasswd files. I commented out the virtual host and directory information referring to this directory as well. I thought this would allow the "/usage/" directory to fall into the same access priviledges as the directories above it. But I don't think it's an access problem at all, as the log still says:

[Thu Dec 16 17:25:03 2004] [error] [client 192.168.15.1] client denied by server configuration: /var/www/usage/index.html

even though the folder I typed in was (on my local filesystem) under /home/web/html with the rest of my site. I guess the alias thing could be the answer, but I can't get that to work. I put something like"

Alias /usage /var/www/usage

and when I restart the server, I get a warning that the alias I added is overlapped by another one and that it will "probably never match."

sdale 01-18-2005 09:23 AM

try looking in /etc/httpd/conf.d/webalizer.conf


All times are GMT -5. The time now is 04:13 PM.