apache access forbidden
I have started apache and sarg on my server but I don't seem to be able to view anything when I go to http://myip.xxx.xxx.xxx/sarg
just says 403 forbidden Forbidden You don't have permission to access /sarg on this server. Apache/2.2.3 (FH) Server at 88.xxx.xxx.xxx Port 80 any clues as to why? |
When troubleshooting 403's best check what user Apache runs as and verify access perms on $DOCROOT/sarg dir are sufficient (and check the httpd log for clues if you have to).
|
Quote:
I assume it's as apache or web? chmod changes perms - I couldn't find any info on google for how to list permissions on a directory. When I do locate sarg it only give me the install folder even though it's definitely there somewhere. where is the httpd log stored? Do I need to turn logging on or is it automatic? |
Try keeping an index.html file in the directory sarg. then access this.
Other way is to turn the directory listing on in the apache conf file |
Quote:
|
My aim for keeping the index.html inside it is to see wether your configuration is serving the request or not. whenever it finds a directory in the URL it looks for index.html or default.html file.
In your case I believe no such file is present in this directory. hence it tires to list the contents of this directory, But unfortunately in your httpd configuration file you have not allowed directory listing, thus you the forbidden error. |
Quote:
it gives me the default apache page of index.html saying a site has not been set up yet. Does the sarg folder contain html files? I jyst checked the directory in the arg folder - there is an index.html there already chmod 755 /var/www/sarg doesn't help |
Quote:
Quote:
Quote:
Quote:
|
I have 2 apache.conf files:
/usr/share/matrixsa-webware/WebKit/Adapters/mod_webkit/apache.conf /usr/share/matrixsa-webware/WebKit/Adapters/mod_webkit2/apache.conf which one does the startup? I cannot find any log files in: /var/log/httpd/ though it seems there is an access_log folder but using cd I can't get into it, says invalid name |
Apache configuration files should be in /etc/httpd on RedHat based systems (like CentOS, which mimicks RHEL). Your web directory should be /var/www/html, unless you have choosen other locations during installation. My interpretation of your problem is that sarg is not within /var/www/html or it is simply an empty directory or has no index.* file(s) or directory permissions are not correct.
Linux |
Quote:
I chmodded the folder to 755. There are no files at all in /var/www/html The current default page when I request http://myip.myip.myip.myip loads up from /var/www/error/noindex.html Since I can see the sarg folder and get to it on the web using http://myip.xx.xx.xx/sarg but get a 403 error, it must be permissions. But 755 should be enough shouldn't it? |
Quote:
Quote:
Else I would just check on the configuration file or do a apachectl -S to get a view of all the hosts your apache is configured for. Nother thing to try out is to create a file like "my.html" inside the /var/www/sarg folder and call it up. If this succedes you know that the permissions are right. |
Try to move the sarg folder under /var/www/html and see if it is accessible.
|
Quote:
Code:
[root@localhost log]# cd /var/log/httpd Quote:
|
tail -f /var/log/httpd/access_log gives this when I access the page
86.xxx.xxx.xx - - [10/Aug/2009:12:36:38 +0100] "GET /sarg HTTP/1.1" 403 281 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11" [root@localhost ~]# apachectl -S VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: _default_:443 localhost.localdomain (/etc/httpd/conf.d/ssl.conf:81) Syntax OK [root@localhost ~]# |
All times are GMT -5. The time now is 05:22 PM. |