Jump to:

546 Posts in 2222 Topics by 237 members

Hosting Requirements

SilverStripe Forums » Hosting Requirements » Update to Working Webhosts (Openhost - New Zealand)

What you need to consider when choosing a hosting provider and plan.

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

Page: 1
Go to End
Author Topic: 1933 Views
  • toherangi
    Avatar
    Community Member
    3 Posts

    Update to Working Webhosts (Openhost - New Zealand) Link to this post

    Kia ora all,

    Just an update on the known working webhosts list at http://doc.silverstripe.org/suggested-web-hosts#working_webhosts

    I have linux hosting with Openhost in New Zealand. I had a few hiccups to start with but with assistance from DesignCity and AJShort on the #silverstripe IRC channel, they have been ironed out nicely!

    If you get hosting with Openhost, just keep the following in mind...
    1) You will need to email Openhost Support and have them

    • Turn Off PHP Safe Mode (On by default)
    • Turn On mod_rewrite
    • Turn Off mbstring.function_overload

    2) You will also need to create your .htaccess file manually, and saving in ascii format.

    ### SILVERSTRIPE START ###
    <Files *.ss>
       Order deny,allow
       Deny from all
       Allow from 127.0.0.1
    </Files>

    <Files web.config>
       Order deny,allow
       Deny from all
    </Files>

    <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /

       RewriteCond %{REQUEST_URI} ^(.*)$
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    </IfModule>
    ### SILVERSTRIPE END ###

    Cheers to DesignCity and AJShort for their help!
    Chur!

  • Aioli
    Avatar
    Community Member
    10 Posts

    Re: Update to Working Webhosts (Openhost - New Zealand) Link to this post

    Kia Ora Toherangi!
    Thank you for your great post about Openhost & SS. I have got Openhost to make the changes you suggested but I'm a bit stuck as to how to implement the htaccess file changes. I've changed the file on my local server but how do I do that on the remote server? I'll try to get help from Openhost also.
    Cheers!
    Ailie

  • Aioli
    Avatar
    Community Member
    10 Posts

    Re: Update to Working Webhosts (Openhost - New Zealand) Link to this post

    I managed to update and upload the .htaccess file. But I still get this coming up on my site:

    Website Error
    There has been an error
    The website server has not been able to respond to your request.

    hmmm

  • toherangi
    Avatar
    Community Member
    3 Posts

    Re: Update to Working Webhosts (Openhost - New Zealand) Link to this post

    Sorry Aioli, are you still having this problem?
    I didn't subscribe to this post so wasn't notified of your response.

  • arthurdent
    Avatar
    Community Member
    132 Posts

    Re: Update to Working Webhosts (Openhost - New Zealand) Link to this post

    I normally provide hosting services through a Christchurch-based ISP, which has provided me with good service for a number of years. This includes some SilverStripe sites, which I have uploaded and which have performed as expected, including having search-engine-friendly URLs. I have just uploaded a new site to an OpenHost account opened by a client who prefers to use this provider. And this is the first time I've had issues with mod_rewrite/search-engine-friendly URLs for a hosted site (my local development environment is another story - frustrating but I can live without this feature... )

    I've read this post and updated my htaccess file in line with Toherangi's original post. I've also checked with OpenHost who have just advised me that the following requirements are met on the server:

    1. Turn Off PHP Safe Mode (On by default)
    2. Turn On mod_rewrite
    3. Turn Off mbstring.function_overload

    I still don't have search-engine-friendly URLs. The view from OpenHost is that 'Writing sites and managing CMS is not part of the service we offer'. Is this an issue with Hosting, the SilverStripe CMS or my code? And if it's down to my code, how do I fix it?

  • arthurdent
    Avatar
    Community Member
    132 Posts

    Re: Update to Working Webhosts (Openhost - New Zealand) Link to this post

    Got it!!

    I had to (manually) place the following .htaccess file in the /httpdocs/ (site root) directory

    ### SILVERSTRIPE START ###
    <Files *.ss>
       Order deny,allow
       Deny from all
       Allow from 127.0.0.1
    </Files>

    <Files web.config>
       Order deny,allow
       Deny from all
    </Files>

    # This denies access to all yml files, since developers might include sensitive
    # information in them. See the docs for work-arounds to serve some yaml files
    <Files *.yml>
       Order allow,deny
       Deny from all
    </Files>

    ErrorDocument 404 /assets/error-404.html
    ErrorDocument 500 /assets/error-500.html

    <IfModule mod_alias.c>
       RedirectMatch 403 /silverstripe-cache(/|$)
       RedirectMatch 403 /vendor(/|$)
       RedirectMatch 403 /composer\.(json|lock)
    </IfModule>

    <IfModule mod_rewrite.c>
       SetEnv HTTP_MOD_REWRITE On
       RewriteEngine On
       RewriteBase '/'

       RewriteCond %{REQUEST_URI} ^(.*)$
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_URI} !\.php$
       RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [L]
    </IfModule>
    ### SILVERSTRIPE END ###

    That fixed it!

    1933 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.