Apache: Protect a folder by a password, but one file is for public access


let us assume you want to protect a whole directory by password and but one file must be readable for public access. This can easily be done by a .htaccess file.

For example: Who want to trotect the folder /var/www/html and only the file public.html should be readable without a password.
More »

Advertisment to support michlstechblog.info

Apache: Protect just one file in a directory by password


these are the steps to protect a single file in a directoy by a password.

More »

Linux: Install LAMP stack on debian

Hi ,

this post describes the steps to install a lamp stack on debian linux. This is the base for many content management systems like Joomla, WordPress or Drupal.

LAMP means linux as operating system, apache as webserver,  mysql as database and PHP as script language. To install all packages login as root.
More »

WordPress: prevent comment spam on wordpress


on wordpress based websites comment spam is all around.

If you are hosting WordPress on a apache webserver there is a simple but effective way to refuse automatically created comment spam from bots:
Redirect all HTTP Post requests directed to the wordpress comment form (wp-comments-post.php) and which do not have a referer from your site or has an empty User-Agent string away from your site. For example to the bots localhost 🙂

The only requirement is the apache module mod_rewrite and a .htaccess file in the root folder of your blog.

If not exists, create a .htaccess file within the root directory of your blog, or add the following directive to an already existing .htaccess file. Replace “www.yourdomain.com” with the address of your website.
More »

Apache: Setting up a simple reverse proxy


this post describes how to setup a reverse proxy for a host. All http requests to host reverseproxy.domain.org should deliver the content of www.domain.org at Port 8080.

First you have to enable the requiered modules in httpd.conf

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Then insert a virtual host directive:

<VirtualHost *>
    ServerName reverseproxy.domain.org
    ProxyRequests off
    ProxyPreserveHost On
    ProxyPass / http://www.domain.org:8080/
    ProxyPassReverse / http://www.domain.org:8080/

That’s it.


Original Theme by Schiy · Powered by WordPress