Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

Thursday, September 13, 2007

Checklist for WordPress “Pretty Permalinks” on Ubuntu

  1. Enable mod_rewrite
    cd /etc/apache2/mods-enabled
    sudo ln -s ../mods-available/rewrite.load rewrite.load
  2. Change to AllowOverride All in userdir
    sudo vim userdir.conf
    Example of my userdir.conf:
    <Directory /dir/to/wordpress>
    AllowOverride All
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    </directory>
  3. Customize Permalink Structure in WordPress admin page
  4. Copy .htaccess in WordPress directory if not created.
    cd /dir/to/wordpress
    sudo vim .htaccess

    Should be something linke this:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>

Wednesday, June 06, 2007

Apache & MediaWiki

I've been getting this annoying error message on my MediaWiki page whenever I enter special characters or word "perl".

Method Not Implemented

MediaWiki was installed on test machine so I didn't even bother to fix it until now. The error was due to the software firewall mod installed on Apache. I've temporally disabled firewall only from my workstation computer IP by entering following line to /etc/httpd/conf.d/mod_security.mod:

SecRule REMOTE_ADDR "^192\.168\.14\.1$" nolog,phase:1,allow

Update:Found more problem with mod_security with some other web application so I ended up disabling the apache mod. The server is not on the web, only serving local network, so shouldn't be any security threat though.