Install werc at Dreamhost
Popular web hosting service Dreamhost does not allow users to modify httpd.conf for their hosted domains. Limited options are enabled for .htaccess files. Below is the method used to configure a working site that ran at Dreamhost.
Setup
Install plan9port or 9base in your home directory: /home/username/plan9
Unpack werc into your domain’s directory: /home/username/domain.com
Create a directory for your domain: /home/username/domain.com/werc/sites/domain.com
initrc.local
cp initrc to initrc.local and modify
plan9port=/home/username/plan9
werc.rc
Modify /home/username/domain.com/werc/bin/werc.rc
#!/home/username/plan9/bin/rc
werc.cgi
Create /home/username/domain.com/werc/bin/werc.cgi
#!/bin/sh
export PLAN9=/home/username/plan9
export PATH=$PLAN9/bin:$PATH
exec ./werc.rc
.htaccess
Create /home/username/domain.com/.htaccess
ReWriteEngine On
<IfModule mod_dir.c>
DirectoryIndex /werc.cgi
</IfModule>
RewriteRule (.*) /home/username/domain.com/werc/sites/%{HTTP_HOST}/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /home/username/domain.com/werc/bin/werc.cgi
RewriteRule /werc.rc /home/username/domain.com/werc/bin/werc.cgi
ErrorDocument 404 /werc.cgi
To post a comment you need to login first.