• HTTPS Redirects

    Redirecting HTTP to HTTPS for a whole site using virtual hosts:

    
    
    
    
    #Basics snipped for brevity....
    
    
       RewriteEngine on
       #RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    
    
    RedirectPermanent / https://www.foo.com/
    
    

  • Raw FTP Commands

    I retrieved it from here: http://www.nsftools.com/tips/RawFTP.htm

    List of raw FTP commands
    (Warning: this is a technical document, not necessary for most FTP use.)

    Note that commands marked with a * are not implemented in a number of FTP servers.

    Common commands


  • Solaris someuser cron not running

    Keep running into this problem. Getting cron failures in /var/cron/log:


    someuser 4151 c Mon Feb 29 12:35:00 1993
    ! bad user (someuser) Mon Feb 29 12:35:00 1993

    Inevitably, the user has locked themselves (or a malicious someone) out of the server.

    Check /etc/shadow for *LK* on the user.

    passwd -u someuser to unlock.


  • Solaris 10 DNS Oops! WTF?! Oh Yeah!

    When building Solaris 10 servers in bulk.. That is 1 or more at a time. I usually don’t enable any sort of name resolution until later.

    That’s the problem. When later rolls around, I’ve forgotten that I hadn’t enabled anything.

    This would be fine and dandy if nslookup or host would let me know that my /etc/nsswitch.conf is only looking at files. It ignores that and goes strictly with what is in /etc/resolv.conf seemingly. So if that’s broke or incorrect it will, at least, tell you that.


  • Bind9: Master Only

    Configuration for a master only DNS server.

    1. WILL NOT answer queries
    2. WILL NOT forward queries
    3. WILL NOT perform recursion
    4. WILL allow transfers from specified slaves

    Zone and configuration files are backed up disk to disk via rsync.

    Single point editing of our name space.

    Single point of failure. If server is lost, updates to DNS cannot be made until another master is brought online.

    options {
    directory “/etc”;
    pid-file “/var/run/named.pid”;
    version “Windows 3.11″;
    allow-query {“none”; };
    allow-recursion {“none”; };
    notify yes;
    also-notify {
    IPn.IPn.IPn.IPn;
    };
    allow-transfer {
    IPn.IPn.IPn.IPn;
    };
    };