• Postfix / sendmail config for DKIM, SPF and DMARC Tutorial Guide E-mail Delivery for Hotmail.com Gmail.com and More HowTo


    This will be the goto to help solve e-mail delivery issues and talk about many practical issues that happen between developers, admins and scripts that send e-mail and do things that may not be acceptable or cause deliverability problems. Sendmail Stuff Edit /etc/mail/sendmail.mc The problem is that if you send directly out from the server using the mail function, the Return-path of the e-mails will be username@thehostnameoftheserver.com. Let........
  • How To Install OpenProject on Centos 7 Step-by-Step Guide


    There are a few caveats that may not be obvious to everyone so I am going to cover them here but keep this in mind before starting. Before starting install epel or you will be missing tesseract: yum -y install epel-release #1) When you specify your SSL certificate with a full path, it really needs to exist where you tell it to (including the default location of /etc/ssl/certs and /etc/ssl/c........
  • Wordpress overwrites and wipes out custom htaccess rules and changes soluton


    cat .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] I keep reading there is a "# BEGIN WordPress" and a "# END WordPress" in the wordpress htaccess above but there is clearly not. Even more strange is that my permissions are just 444 (read only). so i changed it........
  • Apache htaccess and mod_rewrite how to redirect and force all URLs and visitors to the SSL / HTTPS version


    It is really simple using .htaccess with mod_rewrite. Here is all you need: RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://site.com/$1 [R=301,L] Another more graceful way is to use the %{SERVER_NAME}variable to make it dynamic. Just be careful that the server name will always match what you expect. (eg. if you are doing load balancing or clustering what if the server name may be somethi........
  • How To Disable htaccess inheritance or exclude a directory


    The only real way us to do the following in the root of your site's .htaccess RewriteRule ^somedirectory-not-to-inherit/.*$ - [L]........
  • Redirect www host to non-www Linux Apache modrewrite


    The below forces all request to your domain to go to the main non-www root domain. Updated code: RewriteCond %{HTTP_HOST} !=domain.com RewriteRule ^(.*)$ https://newurl.com/subdir/$1 [R=301,L] If you don't want it to go to a subdirectory: RewriteCond %{HTTP_HOST} !=domain.com RewriteRule ^(.*)$ https://newurl.com/$1 [R=301,L] Bad code: This code is bad beca........
  • Force SSL for all URLs Apache htaccess modrewrite


    The best way is as below in .htaccess using modrewrite, any request that is not SSL will be redirected to https://domain.com and the exact same URL RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L]........
  • htaccess modrewrite query string to another URL howto


    This example is based on Wordpress but applies to any other query string eg. http://wordpress.com/?p=55 If you want to manually redirect that p=55 to /some/other/url how do you do it? RewriteCond %{QUERY_STRING} p=55 [NC] RewriteRule .* /new-url/? [R=301,L] You can change the p=55 to whatever your query string looks like. Remember to keep the "?" at the end of the new URLunless you really want the query s........
  • .htaccess mod_rewrite preserve access to custom query string solution


    I struggled with this for awhile because sometimes you have rewritten URLs that you want to pass a query string but most of the info and examples do not support this. Take a typical example like this: RewriteRule ^(.*)-(.*)-(.*) /?module=$3&id=$2 You need to add the QSA flag to make it work like below: RewriteRule ^(.*)-(.*)-(.*) /?module=$3&id=$2 [QSA] The QSA preserves the original query string but also appends it wit........
  • CPanel Apache httpd won't start solution: Starting httpd: Syntax error on line 2 of /etc/httpd/conf/httpd.conf: Invalid command 'Alias', perhaps misspelled or defined by a module not included in the server configuration


    root@hkhosting [/]# service httpd start Starting httpd: Syntax error on line 2 of /etc/httpd/conf/httpd.conf: Invalid command 'Alias', perhaps misspelled or defined by a module not included in the server configuration ........
  • htaccess block IPs while RewriteEngine/modrewrite is enabled solution


    Istruggled with this for awhile because the normal setup won't work if modrewrite is being used: ORDER ALLOW, DENY So the solution is something like this: order allow,deny deny from 12.43.12.0/24 allow from all ........
  • htaccess modrewrite problem with rewriting url with- dashes solution


    I was getting frustrated with trying to write a simple URL like this: /example-withdash I used the htaccess code like this: Rewriterule ^example-withdash$ / [R=301] I also tried escaping the dash which I thought should have treated it as a literal but that didn't work either: Rewriterule ^example-withdash$ / [R=301] But it wouldn't work, apparently the "-" dash means don't substitute,........
  • Enable SPAMASSASSIN on Postfix in 5 minutes


    Centos 5 Postfix and SPAMASSASSIN Tutorial yum install spamassassin chkconfig spamassassin on vi /etc/mail/spamassassin/local.cf ############## #required_hits 5 #report_safe 0 #rewrite_header Subject [SPAM] #5 is the least restrictive (means only the most obvious SPAM is caught. 0 is obviously the most restrictive/sensitive and would have lots of false positives require........
  • MySQL SubQuery


    MySQL SubQueryI was trying to do a sub-query here but it wouldn't work (Syntax Error) in MySQL for some reason even though based on the SQL standards it should be ok. [i:1268bfa39e][b:1268bfa39e]I found the reason this doesn't work. I am using MySQL 3.23 and I read on the MySQL web site that versions before 4.1 DO NOT SUPPORT SUB-QUERIES so it showed me how to rewrite the following as a LEFT join instead of a sub-query. [/b:1268bfa39e][/i:1268bfa39e]........
  • NEC ND-3500A is great!


    NEC ND-3500A is great!I just picked up an NEC 3500A a few weeks ago and I love it. It is a great all in-one optical drive solution. It can burn DVD/+R-R at up 16x, read at 16x and rewrite at 4x and CD-R at up to 48x! Not bad, but the impotant part is that it delivers consistent high quality burns and the drive is as quiet as I could ask it to be. It's also convenient that it has a lot of hacked firmware for overspeeding of........
  • How to avoid web content hijacking/copying/Force content to be accessed by only 1 domain name


    This is something that happens a lot and it is very dirty, as you probably know each site is hosted on a certain IP address. Sometimes a domain is hosted by a single IP address and the IP address defaults to this very same domain. This means that if someone buys domain abcd.com and enters your IP address (the one of your website) as the A record, your content will show up on their domain as if it was their own. There is an easy way to prevent this by using .htacces........
  • Latest Articles

  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint
  • Save money on bandwidth by disabling reflective rpc queries in Linux CentOS RHEL Ubuntu Debian
  • How to access a disk with bad superblock Linux Ubuntu Debian Redhat CentOS ext3 ext4
  • ImageMagick error convert solution - convert-im6.q16: cache resources exhausted
  • PTY allocation request failed on channel 0 solution
  • docker error not supported as upperdir failed to start daemon: error initializing graphdriver: driver not supported
  • Migrated Linux Ubuntu Mint not starting services due to broken /var/run and dbus - Failed to connect to bus: No such file or directory solution