Jump to:

558 Posts in 3572 Topics by 244 members

Hosting Requirements

SilverStripe Forums » Hosting Requirements » I would love to see more info/support for IIS

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

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

Page: 1 2
Go to End
Author Topic: 4412 Views
  • cheekygeek
    Avatar
    Community Member
    6 Posts

    I would love to see more info/support for IIS Link to this post

    Like many people, my preference is Linux/Unix for hosting/servers but I'm trapped working in a Windows Server environment. There are also a lot of IIS 5 and IIS 6 servers still out there. I'd like to see more instructions for installation that are IIS-specific (that included recommendations for the best way to install PHP and run SilverStripe on it. (for example, changes to the php.ini file like whether one should, or should not, turn on auto_detect_line_endings).

    In particular, we need a good (free) way to handle the rewrite stuff. I think that the IIRF looks like it should work, but since it uses its own .ini file instead of reading the .htaccess files, we need some regex guru to translate the rules that SilverStripe needs (writes in the .htaccess file) and translate it into the IIRF instructions in the .ini files. (Example .ini files are here, including one for Joomla). If someone can provide one for SilverStripe, I'll bet they will include a link on their site to it also.

    This would open up SilverStripe to all sorts of additional potential users.

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: I would love to see more info/support for IIS Link to this post

    Hi cheekygeek,

    We are working on this. We've started with the latest version of IIS - 7.0 - because it has much better support for PHP, as well as a Microsoft-distributed rewrite engine.

    The IIRF ini file looks pretty similar to a .htaccess file; if anyone manages to get a working replacement for our standard .htaccess they should post it to the iis-installation wiki page.

    cheekygeek, if you want to attempt this, feel free to post back here asking for help .

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: I would love to see more info/support for IIS Link to this post

    cheekygeek, I'm assuming you looked at the alternatives mentioned at http://doc.silverstripe.com/doku.php?id=iis-installation ?

    To reiterate with Sam, if you do come up with the .ini answers, please add them as a comment on the wiki page above, as that is the reference page for installing on IIS.

  • gingercat
    Avatar
    Community Member
    7 Posts

    Re: I would love to see more info/support for IIS Link to this post

    I am thinking IIRF is probably the best option for older servers as well. BUT like everyone else I have failed to get the rewrite rules working correctly so far.

    SS works great on our WAMP test server but our production server is IIS6 and our linux server is offshore and appears to be pretty slow for SS.

  • Stephan
    Avatar
    Community Member
    55 Posts

    Re: I would love to see more info/support for IIS Link to this post

    I just managed to get Silverstripe 2.2.3 work on IIS6.0.
    With the help of Helicon ISAPI Rewrite (like mentioned in the installation guide).

    But one strange thing happend:
    The base url was changed to https !

    I finally found out what the problem is:
    In sapphire/core/control/director.php
    The function protocolAndHost checks the presence of $_SERVER['HTTPS'].
    But this is always available on IIS 6.0.
    If no SSL is running, it has the value "off".
    Ass a quick an very dirty hack I just skipped this line (258) and
    and added $s = ''; and now it works.
    Of course I have to find a better solution.
    I just wanted to let you know.

    CU Stephan

  • Sigurd
    Avatar
    Forum Moderator
    628 Posts

    Re: I would love to see more info/support for IIS Link to this post

    Stephan the HTTPS issue is fixed in the upcoming SS 2.3.0... you can find the changeset at http://open.silverstripe.com if you really need it.

  • ricpersi
    Avatar
    Community Member
    3 Posts

    Re: I would love to see more info/support for IIS Link to this post

    I agree with gingercat.. I'd really love to see a configuration file for IIRF (http://iirf.codeplex.com).
    It shouldn't be too hard to implement, or is it? I had a try with it but got not too far. Hopefully
    someone with more IIRF knowledge will help us.

    Best regards,

    Riccardo

  • kcd
    Avatar
    Community Member
    54 Posts

    Re: I would love to see more info/support for IIS Link to this post

    Hey all. I did this recently so give this code a go and let me know if you run into any problems.

    IsapiRewrite4.ini

    # IsapiRewrite4.ini
    # 5-11-2009

    # Status for debugging
    #StatusUrl /iirfStatus RemoteOK

    # Log
    RewriteLog C:\[somewhere for the log file]\silverstripeiirf
    RewriteLogLevel 1

    RewriteEngine On
    MaxMatchCount 10
    IterationLimit 5

    # Rewrite for SEO friendly urls for SilverStripe

    # URLs with query strings
    # Don't catch successful file references
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)\?(.+)$ /sapphire/main.php?url=$1&$2 [L,I]

    # URLs without query strings
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ /sapphire/main.php?url=$1 [L,I]

    Easy as that.

    I also did fun things with redirects and subdomains. Hope it works for you.

    4412 Views
Page: 1 2
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.