<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.wiki.balinskis.lt/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www.wiki.balinskis.lt/feed.php">
        <title>MyWiki - webservers</title>
        <description></description>
        <link>https://www.wiki.balinskis.lt/</link>
        <image rdf:resource="https://www.wiki.balinskis.lt/_media/wiki:dokuwiki.svg" />
       <dc:date>2026-04-18T09:33:33+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.wiki.balinskis.lt/webservers:apache-badbots-redirect?rev=1528103261&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wiki.balinskis.lt/webservers:apache-force-https?rev=1540304766&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wiki.balinskis.lt/webservers:apache-wp-login-sec?rev=1528103274&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wiki.balinskis.lt/webservers:nginx-block-badbots?rev=1528103313&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www.wiki.balinskis.lt/_media/wiki:dokuwiki.svg">
        <title>MyWiki</title>
        <link>https://www.wiki.balinskis.lt/</link>
        <url>https://www.wiki.balinskis.lt/_media/wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://www.wiki.balinskis.lt/webservers:apache-badbots-redirect?rev=1528103261&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-06-04T09:07:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apache-badbots-redirect</title>
        <link>https://www.wiki.balinskis.lt/webservers:apache-badbots-redirect?rev=1528103261&amp;do=diff</link>
        <description>Apache .htaccess block bad bots

Just put rewrites to .htaccess:


RewriteEngine On
RewriteCond %{REQUEST_URI} !/robots.txt$
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^.*AhrefsBot.*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*semrushbot.*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*semrushbot-sa.*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*MJ12bot.*$ [NC]
RewriteRule ^.*.* http://www.google.com/ [L]</description>
    </item>
    <item rdf:about="https://www.wiki.balinskis.lt/webservers:apache-force-https?rev=1540304766&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-10-23T14:26:06+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apache-force-https</title>
        <link>https://www.wiki.balinskis.lt/webservers:apache-force-https?rev=1540304766&amp;do=diff</link>
        <description>Force HTTPS and WWW

Put this to .htaccess


#Force https:
SetEnvIf X-Forwarded-Proto &quot;https&quot; HTTPS=on
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Force www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^DOMAIN.TLD [NC]
RewriteRule ^(.*)$ http://www.DOMAIN.TLD/$1 [L,R=301,NC]</description>
    </item>
    <item rdf:about="https://www.wiki.balinskis.lt/webservers:apache-wp-login-sec?rev=1528103274&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-06-04T09:07:54+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apache-wp-login-sec</title>
        <link>https://www.wiki.balinskis.lt/webservers:apache-wp-login-sec?rev=1528103274&amp;do=diff</link>
        <description>DirectAdmin httpd wp-login.php security

Requirements:


yum install GeoIP GeoIP-devel GeoIP-update -y


Compile mod_geoip from here: &lt;https://github.com/maxmind/geoip-api-mod_geoip2&gt;


wget --no-check-certificate -O /tmp/mod_geoip.c https://raw.githubusercontent.com/maxmind/geoip-api-mod_geoip2/master/mod_geoip.c
apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c /tmp/mod_geoip.c
rm -f /tmp/mod_geoip.c</description>
    </item>
    <item rdf:about="https://www.wiki.balinskis.lt/webservers:nginx-block-badbots?rev=1528103313&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-06-04T09:08:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>nginx-block-badbots</title>
        <link>https://www.wiki.balinskis.lt/webservers:nginx-block-badbots?rev=1528103313&amp;do=diff</link>
        <description>NGINX Block bad bots

First of all check these methods:

	*  &lt;https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker&gt;
	*  &lt;https://github.com/mariusv/nginx-badbot-blocker&gt;

Here I explain how to block bad bots and save a ton of resources on server.

1) Inside http block (nginx.conf) add:


http {
  map $http_user_agent $limit_bots {
     default 0;
     ~*(ahrefsbot|alexibot|appengine|aqua_products|archive.org_bot|archive|asterias|attackbot|b2w|backdoorbot|becomebot|blackwidow|blekkobo…</description>
    </item>
</rdf:RDF>
