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.
access_log is a file. do not cd into it. open it using your favorite text editor like vi.
and once you move the directory have you checked that permissions are intact? or else chown sarge directory to apache user. Your web server will usually run as user apache.
access_log is a file. do not cd into it. open it using your favorite text editor like vi.
and once you move the directory have you checked that permissions are intact? or else chown sarge directory to apache user. Your web server will usually run as user apache.
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 ~]#
error_log:
[Mon Aug 10 12:48:06 2009] [error] [client 86.xxx.xxx.xxx] client denied by server configuration: /var/www/sarg
error log gives:
[Mon Aug 10 12:48:06 2009] [error] [client 86.xxx.xxx.xxx] client denied by server configuration: /var/www/sarg
copied to sarg to the html folder but still the error:
[root@localhost ~]# cp -r /var/www/sarg /var/www/html
[root@localhost ~]# chown -R apache /var/www/html/sarg
[root@localhost ~]#
had to change the deny and allow from in the sarg.conf file to:
Alias /sarg /var/www/sarg
<Directory /var/www/sarg>
DirectoryIndex index.html
Order deny,allow
#Deny from all
#Allow from 127.0.0.1
#Allow from ::1
# Allow from your-workstation.com
</Directory>
<Directory /var/www/sarg>
DirectoryIndex index.html
Order deny,allow
#Deny from all
#Allow from 127.0.0.1
#Allow from ::1
# Allow from your-workstation.com
</Directory>
Nice but it's not good. Use your ISP's IP range in your "Allow from" rule like I already offered in one of your other threads. I also suggest you have a look at the Apache documentation for ways to password protect access (AuthType Basic: htpasswd).
Nice but it's not good. Use your ISP's IP range in your "Allow from" rule like I already offered in one of your other threads. I also suggest you have a look at the Apache documentation for ways to password protect access (AuthType Basic: htpasswd).
In this guide http://www.ikhwan15.blogspot.com/200...cess-sarg.html
, it says that I need to edit the httpd.conf file to get passwords setup for sarg reports. From my PHP days, I was under the impression I could just stick a .htaccess file in the /var/www/sarg folder
I don't want the document root to be /var/www/sarg so not sure what to edit.
?
Have changed this in httpd.conf but couldn't it go in the /var/www/sarg .htaccess file?
Code:
<Directory /var/www/sarg>
deny from all
AllowOverride AuthConfig
Order deny,allow
</Directory>
I haven't put this in yet - what is the virtual host part for? Seems to work without this bit of code.
In this guide it says that I need to edit the httpd.conf file to get passwords setup for sarg reports. From my PHP days, I was under the impression I could just stick a .htaccess file in the /var/www/sarg folder
I don't understand in this instance why it's needed.
The server root is var/ww/html
Why would I create a virtual host just for the sarg folder?
The .htaccess files only refer to /var/www/sarg so if anybody access http://www.mysite.com, it should still serve the html page whereas if they go http://www.mysite.com/sarg, it will prompt for a password.
I don't understand in this instance why it's needed.
The server root is var/ww/html
Why would I create a virtual host just for the sarg folder?
Me neither but then my ESP is at an alltime low today.
Maybe it was provided as an example for your convenience?
Quote:
Originally Posted by qwertyjjj
The .htaccess files only refer to /var/www/sarg so if anybody access http://www.mysite.com, it should still serve the html page whereas if they go http://www.mysite.com/sarg, it will prompt for a password.
What distribution are you using? Have you looked into the repositories of your package manager to see if sarg is available? If it is there, best way is to install using package manager.
On how to configure it, read the complete thread and you will understand.
Also, no point in making it hidden (ie leading dot). That only applies to .htaccess files.
Whatever name you decide on, the entry in the .htaccess file must be exactly the same.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.