Category Archives: KnowHow

WordPress: prevent comment spam on wordpress

Hi,

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.
Continue reading WordPress: prevent comment spam on wordpress

Apache: Setting up a simple reverse proxy

Hello,

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/
</VirtualHost>

That’s it.

Michael

Apache: Enable Server side includes SSI for a virtual directory

Hi,

short post as reminder how to enable Server Side Includes on a virtual directory.

mod_include must be enabled. MimeType for text/html must associated with .shtml file extension. Sample config for SSI looks like these:


<Directory "D:/user/www/virtualdirectory/">
    Options Indexes FollowSymLinks MultiViews ExecCGI Includes
    AllowOverride All
    Order allow ,deny
    Allow from all
    Require all granted
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</Directory>

See you Michael