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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Installation problems (mod_rewrite) on Ubuntu Intrepid LAMP stack


Go to End


7 Posts   4814 Views

Avatar
Stef

Community Member, 4 Posts

5 December 2008 at 11:07am

Edited: 05/12/2008 11:10am

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

Forum Moderator, 5523 Posts

5 December 2008 at 11:17am

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

Community Member, 4 Posts

5 December 2008 at 11:21am

Edited: 05/12/2008 11:22am

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

Forum Moderator, 5523 Posts

5 December 2008 at 11:41am

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

Community Member, 4 Posts

6 December 2008 at 9:25am

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

Community Member, 4 Posts

6 December 2008 at 9:50am

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

Forum Moderator, 5523 Posts

6 December 2008 at 12:17pm

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!