Author: troy

Apache2 Custom 404 Page

Create a html page sudo vi /var/www/missing.html whateveryouwanttosay sudo chown www-data:www-data /var/www/missing.html sudo vi /etc/apache2/conf.d/localized-error-pages Uncomment #ErrorDocument 404 /missing.html sudo service apache2 restart

Harden Apache 2.2

sudo vi /etc/apache2/conf.d/security ServerTokens Prod ServerSignature Off sudo vi /etc/apache2/sites-available/default Directory /var/www/html> Options -Indexes /Directory> https://www.linuxquestions.org/questions/blog/rearden888-507430/howto-set-up-modsecurity-on-debian-7-35569/

Fail2ban Mysql Database to Manage Persistent Bans

Step 1 Create Database and Tables in MySQL Add a “source” field for the server name if you want to use a remote database setup (and add it to the UNIQUE KEY).The UNIQUE KEY prevents duplicates of course. But this means you can refresh the perl script without handling duplicates there which would complicate things considerably. CREATE TABLE iptable (...

LAMP upgrade to mysql 5.6 PHP installation appears to be missing the MySQL extension which is required by WordPress

WordPress Running on Debian 7 LAMP After upgrading to MYSQL 5.6 from 5.5 I encountered several problems, first of which was a completely broken MySQL then Apache2.3 and PHP complained. This ultimately cleaned up the mess: sudo dpkg –purge mysql-client-core-5.6 sudo dpkg –purge mysql-client sudo dpkg –purge mysql-server-core-5.6 sudo dpkg –purge mysql-common sudo dpkg –purge mysql sudo apt-get –purge remove...

Disable IPV6 on Debian 10

Three (3) steps to completely eliminate IPV6 on your system. Step 3 applies only if you are using SSH in daemon mode (on a server). The following should work for all Debian. Step 1 Step 2 Step 3

Stop the Kernel Logging ipv6

To disable IPv6 on all interfaces system wide sudo vi /etc/sysctl.conf add this line net.ipv6.conf.all.disable_ipv6 = 1 Or To disable IPv6 on an interface only net.ipv6.conf.lo.disable_ipv6 = 1 net.ipv6.conf.eth0.disable_ipv6 = 1 sudo sysctl -p /etc/sysctl.conf or reboot

DD Used Space Only Image File Using Gzip Solved

The problem is how to create an img of a disk (or storage of any kind) while not saving the entire unused space – shrink empty disk space with dd. Like many similar problems, I found many posts about how to save the img of a disk and remove empty partitions. Most are obsolete or did not work as specified, which...

Perl 24 Hour Sleep Clock

I searched a lot for all kinds of sleep and wake solutions to find everything but what I wanted. Hopefully this helps someone else. Problem: based on a 24hour clock, sleep after 5pm and wake (go back to work) at 8am. Or pause during non-work hours. #!/usr/bin/perl use strict; use warnings; my $waketime = 8; # sleep when hour <...

Disable RC4 and SSL3

sudo vi /etc/apache2/mods-available/ssl.conf SSLHonorCipherOrder on SSLCipherSuite “EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS” SSLProtocol All -SSLv2 -SSLv3 SSLCompression Off

How To Configure exim4 on Debian 9

This setup is for a wordpress server that mail-out submissions on the website and assumes that 1) Outbound only. All mail is sent-out via SMTP. You don't want mail retained on the server. 2) there is more than one recipient, re. one for WordPress form submissions and a webmaster (or root). 3) and you are using Google as your SMTP....

Padre Still Crashes on Debian Linux

The linked post was written in 2012 explaining what I think most users of Padre encounter, and therefore I won’t repeat anything already nicely documented there except to quote “And please do not feed me a junk line about it works on my Linux distribution, I do not care. Pretend I am a normal end user for a moment. If...

Force WordPress SSL HTTPS on Only One Page

RewriteEngine On Options -Indexes Options +FollowSymLinks RewriteBase / # force https for all URLs matching “subscribe.* # otherwise normal http request are unmolested # other methods that force ssl cause 301 redirects on # all pages RewriteCond %{HTTPS} =off RewriteRule ^subscribe https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ## standard rule but causes redirect loops #RewriteRule . /index.php [L]...