4803 Posts in 1839 Topics by 1444 members
|Go to End|
14 February 2010 at 9:50am
I'm trying to install Silverstripe v2.3.6 on OpenSuse Linux v11.1 running on a PC at home, to learn something about using it (I'm in charge of a project implementing a Silverstripe based website at work, so figured this would be useful)
I'm technically moderately competent, DBA/GIS & basic web mapping , & running Linux for about 15 years now... but know next to nothing about the underlying setup of Apache, etc. Given the nature of a CMS, I'm not too concerned that an RPM for
OpenSuse doesn't exist, but the book & online docs for a Linux install are pretty much absent, assuming that someone trying to do what I am knows more than I do
I have got the install page running, & enabled mod_rewrite for Apache, the install check says everything is OK.
When I click the install button, I get:
"Friendly URLs are not working. This is most likely because mod_rewrite isn't configured correctly 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'm assuming that if mod_rewrite is enabled, that is not the problem. So what is "my directory" & under Apache/OpenSuse, how should I set "AllowOverride All" for it?
I figure that it is in httpd.conf, & needs an entry something like this, (setting the root to pretty open & insecure, but hopefully working):
Allow from all
But I still get the same error...
Any advice appreciated....
14 February 2010 at 10:46am Last edited: 14 February 2010 10:47am
EDIT: Eep! Helps if I read your whole post before replying...
The problem will be in the main httpd.conf (or apache.conf). There will most likely be a code block that is similar to the following;
This directory block will be applying to the whole server context and will be preventing the .htaccess from working correctly. You can modify this line so that it says AllowOverride All, and then restart Apache.
Check also that there is not another Directory limiting /var/www/ and then you should be good to go.
14 February 2010 at 11:55am
Thanks for the help Owen...
OpenSuse has a somewhat different Apache setup... I think...
docroot is /srv/www/htdocs
I have installed Silverstripe directly under this.
There are several apache *.conf files, with includes wrapping them together, which might simplify some things, but for someone with my level of ignorance, it just means there are more places to look
In the file: /etc/apache2/default-server.conf
there is a section setting flags for <Directory "/srv/www/htdocs"> in a section with the commented out title
"# Configure the DocumentRoot"
This has a line: AllowOverride None
There is no (as yet) section setting up the Silverstripe directory.
With this line as it is, I get the error I described above.
If I change this to AllowOverride All (& restart Apache), then I get the Apache error (when trying to load the Silverstripe install.php file):
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Changing it back reverts to the previous error. I can't see why setting docroot to "AllowOverride All" would do this...
14 February 2010 at 12:05pm
Silverstripe is now running on this box.
I created a new <directory> section in /etc/apache2/default-server.conf for the Silverstripe directory with "AllowOverride All", set the docroot settings back to the default "AllowOverride None"
That seems to work. I guess Apache doesn't like opening up the docroot? If I knew enough to check the apache logs I figure I could confirm this, but I'm happy now it is going
I suppose I should have done this in another file & included it, but this works, & is adequate for my purposes for now.
14 February 2010 at 6:21pm Last edited: 14 February 2010 6:23pm
It's probably for security reasons. Creating a new <Directory> directive and setting the AllowOverride option yourself is the best way. Alternatively, setting up a new site in the sites-available with specific configuration and enabling it with a2ensite is another way. That way you're not editing the apache2.conf file directly. Trouble with Apache is it's configured differently across different *nix platforms. ;-)
|Go to Top|