Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Installation problems (mod_rewrite) on Ubuntu Intrepid LAMP stack


Reply

7 Posts   3455 Views

Avatar
Stef

5 December 2008 at 11:07am (Last edited: 5 December 2008 11:10am), Community Member, 4 Posts

I'm having serious problems installing Silverstripe (both 2.2.3 and 2.3.0 RC2) on Ubuntu Intrepid.

I have the LAMP stack installed as follows:

* apache 2.2.9-7ubuntu3
* mysql Ver 14.12 Distrib 5.0.67, for debian-linux-gnu (x86_64) using readline 5.2
* PHP 5.2.6-2ubuntu4 with Suhosin-Patch 0.9.6.2 (cli) (built: Oct 14 2008 20:18:13)

When installing Silverstripe in /var/www (or anywhere else for that matter), I get an error from the installer as follows:

Friendly URLs are not working. This is most likely because mod_rewrite isn't configuredcorrectly on your site. Please check the following things in your Apache configuration; you may need to get your web host or server administrator to do this for you:

* mod_rewrite is enabled
* AllowOverride All is set for your directory

mod_rewrite is definitely installed and enabled. I find it under Loaded Modules when running phpinfo() and the Silverstripe installer claims to be happy that mod_rewrite is enabled too.

I've put the directive below into the /etc/apache2/httpd.conf file (which is included by apache.conf) and also straight into apache.conf and then restarted apache.

<Directory /var/www>
AllowOverride All
</Directory>

None of this has helped. Has anyone run into the same problems? I'm convinced that it's some small setting somewhere that will get it working.

Thanks
Stef

Avatar
Willr

5 December 2008 at 11:17am Forum Moderator, 5511 Posts

I setup SS on a Ubuntu server the other day and just needed to add this to the /etc/apache2/apache2.conf file to get mod_rewrite to work correctly

<IfModule mod_rewrite.c>
RewriteEngine On
</IfModule>

Avatar
Stef

5 December 2008 at 11:21am (Last edited: 5 December 2008 11:22am), Community Member, 4 Posts

Thanks willr. I'll give it a go when I get home.

I think AllowOverride All is the default for all directories anyway, so it shouldn't be necessary to set that explicitly in the Apache config files.

How have you found Silverstripe? I'm busy looking around for a CMS based on PHP for use on a LAMP stack and Silverstripe looks like a really good candidate, as long as I can get it working.

Stef

Avatar
Willr

5 December 2008 at 11:41am Forum Moderator, 5511 Posts

Well If you are running your own ubuntu setup then you are already going to find it alot nicer. SilverStripe has quite a tight configuration for what it needs to run so having full server access makes setting it up and running it alot less troublesome (ubuntus normally easy to setup too)

Avatar
Stef

6 December 2008 at 9:25am Community Member, 4 Posts

I'm afraid that the advice didn't solve my problem. I still get the following when I try to install 2.3.0 RC2:

Warning: unlink(mysite/_config.php) [function.unlink]: Permission denied in /var/www/install.php on line 709
# Creating 'mysite/_config.php'...
# Creating /var/www/mysite/_config.php
# Creating '.htaccess' file...
# Creating /var/www/.htaccess
# Building database schema...
# Checking that friendly URLs work...
# Friendly URLs are not working. This is most likely because mod_rewrite isn't configuredcorrectly on your site. Please check the following things in your Apache configuration; you may need to get your web host or server administrator to do this for you:

* mod_rewrite is enabled
* AllowOverride All is set for your directory

I tried putting the IfModule section into httpd.conf and apache2.conf. Shouldn't make a difference where it goes.

Anyone got any advice?

Thanks
Stef

Avatar
Stef

6 December 2008 at 9:50am Community Member, 4 Posts

I sorted out this issue. Seems that there is a file called default that lives in the apache directory under sites-available (/etc/apache2/site-available/default on my system). I need to to change the AllowOverride setting in there for the root of my Silverstripe installation directory.
Is there a better place to get help with Sivlerstripe issues? Seems activity on this forum is a little sparse.

Avatar
Willr

6 December 2008 at 12:17pm Forum Moderator, 5511 Posts

If you need more instant support check out the IRC channel. Usually there is about 20 people on that and at least 1 or 2 of the core devs round to help out.

Good work on getting your issue sorted out. You might like to add that to the wiki under installation problems or something like that so if this issue comes up then it will help someone else!