views:

423

answers:

3

Hi there Guys.

I'm currently working on a new website and want to run Elgg (Elgg.org) on it. It's fully running on PHP5 and has a lot of rewrite rules defined in the .htaccess files. On the Elgg community I didn't found / get any answers, so I will try and ask them here.

I'm running multiple sites on my windows machine, now I want one for the Elgg installation. Let's say we put them on obc.example.com. I added the following lines to my httpd-vhosts.conf file:

# De New Elgg Environment

<VirtualHost *:*>
    DocumentRoot "C://htdocs/elgg/OBC"
    ServerName example.com
    ServerAlias obc.example.com
</VirtualHost>

The problem is, when I run the Elgg installer (e.g.) direct to obc.example.com, eerything seems to work fine in the first place. I get a nice screen that ask me for the database stuff. When I submit the page I get the next screen in the process. This is for the credentials of the website I'm making. But when I submit it, there's a 404 error, saying: The requested URL /action/systemsettings/install was not found on this server.

This is caused by the rewrite engine. The Elgg troubleshooting docs tell me that this is. ;)

The problem is now: how can I tell apache to use the .htaccess file for the rewrite rules? ~But only for this domain? (vhost, obc.example.com)

Regards,

Douwe Pieter

A: 

Read the .htaccess files tutorial on how to use .htaccess files.

Gumbo
A: 

You'll need something like

<Directory "C://htdocs/elgg/OBC">
    AllowOverride All
</Directory>

You can change the All to something else to restrict what kinds of directives are allowed in .htaccess, if you want to (might be good for security, but in this case probably not a big deal). The details are at the link Gumbo provided.

Alternatively, you could just copy and paste the contents of the .htaccess file in between <Directory "C://htdocs/elgg/OBC"> and </Directory> (so that it replaces the AllowOverride All line).

David Zaslavsky
A: 

Though elgg does not support this. If you are using a debian based linux ... http://narnarnar.com/elgg/elgg_1.5-1_all.deb ... seemed to fix all my installation trouble. I installed it on ubuntu 9.04.

make sure you did an apt-get install virtual-mysql-server first.

Kirby