selfoss running on IIS 7

by matup, Friday, July 12, 2013, 05:35 (3995 days ago) @ pumm3l
edited by matup, Friday, July 12, 2013, 06:02

In order to work do the following changes:

1 - Point Web Site to public folder rather than the root folder.
2 - Create a "index.php" file in public folder width the following line:

<?php chdir('../'); include('index.php'); ?>
3 - Set the web.config with the following data:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rewrite" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="^.*\.svg$|^.*\.ttf$|^.*\.css$|^.*\.js$|^.*\.jpg$|^.*\.jpeg$|^.*\.png$|^.*\.gif$|^.*\.ico$|^.*\.htm$|^.*\.html$|^.*\.txt$|^.*\.xml$|^.*\.xlsx$|^.*\.xls$|^.*\.swf$|^.*\.flv|^.*\.mp4|^.*\.ogg$" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<directoryBrowse enabled="false" />
<httpErrors errorMode="DetailedLocalOnly" defaultResponseMode="File"></httpErrors>
<staticContent>
<remove fileExtension=".ttf" />
<remove fileExtension=".svg" />
<mimeMap fileExtension=".ttf" mimeType="application/octet-stream" />
<mimeMap fileExtension=".svg" mimeType="application/octet-stream" />
</staticContent>
</system.webServer>
</configuration>

4 - Modify the file "controllers\Index.php" (around line 180) function "update" remove the comparison "$_SERVER['SERVER_ADDR'] != $_SERVER['REMOTE_ADDR']", because $_SERVER['SERVER_ADDR'] does not exists in IIS, or use LOCAL_ADDR instead.
5 - Add virtual directory "favicons" pointing to "<DIR>\data\favicons"
6 - Add virtual directory "thumbnails" pointing to "<DIR>\data\thumbnails"

7 - Enjoy!:-)


Complete thread:

 RSS Feed of thread

powered by my little forum