Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

How to set Apache not to log requests for images or javascript


Having around 100 visitors per day could make your apache logs very large and this would not be very pleasant for any web server admin. One thing you could do is to configure apache not to log requests for Images, java scripts or any other extension.

How to prevent visitors from viewing .htaccess and .htpasswd files

Hide .htaccess file by disallowing access to .htaccess files to browsers
Every .htaccess file from any web server out there will have sensitive data inside it. If .htaccess files are not protected by default, they can be accessed by anyone (just type in your borwser: http://www.site.com/.htaccess and, if this restriction is in place, you'll get a 403 Forbidden error).