depicus

changing the digital world one bit at a time...

Blants (noun) the rants of a blogger

  1. How to enable mod_rewrite in Ubuntu

    January 27, 2012 by The Man

    sudo a2enmod rewrite


  2. Adding a website in OSX for debugging or testing

    December 4, 2011 by The Man

    1. First edit your host file so you have a quick URL to use in your browser

    sudo nano /private/etc/hosts

    2. Edit the Apache config file to add a virtual server

    sudo nano /etc/apache2/httpd.conf

    or if we are on 10.9+ then allow by uncommenting

    Include /private/etc/apache2/extra/httpd-vhosts.conf

    And on 10.10 Yosemite uncomment

    LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so

    save then open

    sudo nano /etc/apache2/extra/httpd-vhosts.conf

    and add

    # Depicus Web Site
    
    ServerAdmin anybody@example.com
    DocumentRoot "/Library/WebServer/Depicus/"
    DirectoryIndex index.php
    
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    
    ServerName Depicus
    ErrorLog "/private/var/log/apache2/Depicus-error_log"
    CustomLog "/private/var/log/apache2/Depicus-access_log" common

    3. Restart Apache and you are good to go.

    sudo apachectl -k restart
    

  3. “name” is a reserved word in WordPress

    August 31, 2011 by The Man

    Just spent a few hours trying to debug a custom form in WordPress. The problem was every time the form was submitted I got a 404 error. Turns out the text input called “name” was the problem and “name” seems to be a reserved word in WordPress. Changed to something else and it all worked fine.