Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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).
Right, how do I fine out what user apache runs as?
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?
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.
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.
Well...if I type in http://IP.IP.IP.IP/
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
When I do locate sarg it only give me the install folder even though it's definitely there somewhere.
Sarg may use its own configuration file to be included by the running webserver from say /etc/httpd/conf.d/. The configuration file may include Allow/Deny rules.
Quote:
Originally Posted by qwertyjjj
where is the httpd log stored? Do I need to turn logging on or is it automatic?
Both questions can be answered by reading its main configuration file.
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.
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.
sarg is in /var/www/sarg but the index file is there.
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?
Since I can see the sarg folder and get to it on the web but get a 403 error, it must be permissions. But 755 should be enough shouldn't it?
775 sure is enough but make sure that all the folders down from the root are readable by the webuser.
Quote:
Originally Posted by qwertyjjj
sarg is in /var/www/sarg but the index file is there.
I chmodded the folder to 755.
The log files should give you a hint what going on. Do a tail -f /var/log/http/acces_log and then connect to the webserver
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.
775 sure is enough but make sure that all the folders down from the root are readable by the webuser.
The log files should give you a hint what going on. Do a tail -f /var/log/http/acces_log and then connect to the webserver
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.
I can't get to access_log ?!
Code:
[root@localhost log]# cd /var/log/httpd
[root@localhost httpd]# dir
access_log error_log ssl_access_log ssl_error_log ssl_request_log
[root@localhost httpd]# cd access_log
-bash: cd: access_log: Not a directory
[root@localhost httpd]# cd /var/log/httpd/access_log
-bash: cd: /var/log/httpd/access_log: Not a directory
[root@localhost httpd]#
Quote:
Originally Posted by linuxlover.chaitanya
Try to move the sarg folder under /var/www/html and see if it is accessible.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.