Apache Help
Hi,
I have appache running with no problems on my CentOS box. Serving my MythWeb and MySQLadmin page. I am trying to get MRTG pages to display. MRTG is configure right and pulling data from my router but i cant view the html pages through apache. when trying 192.168.0.202/mrtg I get a 403 forbidden error message. Details: MRTG HTML files are in: /var/www/html/mrtg Code:
[root@mythtv html]# pwd Code:
<Directory "/var/www/html/mrtg"> Logs: error_log: Code:
[Sat Nov 01 12:03:25 2008] [error] [client 192.168.0.149] client denied by server configuration: /var/www/mrtg Code:
192.168.0.149 - - [01/Nov/2008:12:03:25 -0500] "GET /mrtg/ HTTP/1.1" 403 285 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729)" Thanks, Mitchell |
Do you need to set up an Alias for that directory?
Quote:
Maybe you are more restrictive at the / directory, so you're seeing this error. (Again, you could make a /mrtg Alias.) --------- Edit: I take it back. I just tested out a config similar to your own, and an Alias was not required. (i.e. My DocumentRoot is /var/www/html.) I'm not sure what your issue is. |
Quote:
Code:
[root@mythtv cfg]# ls /var/www/ Mitchell |
In light of my edit (in my first post), I would double check your DocumentRoot. If you changed it to /var/www then that might explain the error.
|
nope, document root is correct:
DocumentRoot "/var/www/html" Im really confused becuase 192.168.0.202/mythweb works but 192.168.0.202/mrtg gives 403! AHHH. |
Remove all access restrictions (auth and 'allow from') from the mrtg directory and try browsing again. The apache logs might then give a better indication of what's happening.
|
Quote:
#<Directory "/var/www/html/mrtg"> # Options Indexes FollowSymLinks # AuthType Basic # AuthName "MRTG" # AuthUserFile /etc/httpd/conf/httpd-passwords # require user mitchell # Order allow,deny # Allow from 192.168.0. # Satisfy any #</Directory> I posted my logs from apache ealier but here they are again. I have cat /dev/null'ed them before hitting the page so this is what is generated when i hit that exact page. Code:
[root@mythtv httpd]# cat access_log Mitchell |
Man look at additional include configuration files for apache, if especial you install mtrg and apache from centos repo, I think they are in /etc/httpd/conf.d/mtrg.conf or something like that.
You should have in /etc/httpd/conf/httpd.conf some entry: Include /etc/httpd/conf.d/* Just check... Check coz you are confusing the server having maybe 2 entries. |
If you make another directory under 'html', e.g., 'test', and put an html file in it, can you browse it OK?
If no, then there's an issue with your httpd.conf. Check httpd.conf to make sure there aren't two DocumentRoot lines. Review configuration for the / directory. If you can browse it OK, then the problem is specific to the 'mrtg' directory. Is there an .htaccess file in the mrtg directory? Check its contents. grep for any occurrence of 'mrtg' in httpd.conf, or in any file included in httpd.conf. |
Quote:
That was it. Originally mrtg.conf was: Code:
[root@mythtv www]# cat /etc/httpd/conf.d/mrtg.conf Code:
[root@mythtv ~]# cat /etc/httpd/conf.d/mrtg.conf Code:
<Directory "/var/www/html/mrtg"> This makes no sense..Why would MRTG rpms make the config file for web pages point to /var/www when the default Apache root directory is /var/www/html! Well its working now! Thank You! Mitchell |
Quote:
|
All times are GMT -5. The time now is 06:44 PM. |