Shared Installation with IIS

Having trouble installing serendipity?
Post Reply
JPhilip
Regular
Posts: 8
Joined: Mon Jul 07, 2008 9:45 pm

Shared Installation with IIS

Post by JPhilip »

Has anyone done a shared S9Y installation on Windows with IIS ?
All I could find is the info at: http://www.s9y.org/41.html
I will try to extrapolate from it.
So far I got the single blog install to work fine.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

It's going to depend on whether IIS follows Windows shortcuts or not, I believe. Nobody's done it yet, so you're blazing new trails. We'll help out wherever we can, of course.
Judebert
---
Website | Wishlist | PayPal
JPhilip
Regular
Posts: 8
Joined: Mon Jul 07, 2008 9:45 pm

Post by JPhilip »

Thanks,

I got it to work for the most part with a little hack:

- Install s9y in a s9y folder
- Create a folder under s9y caller users
- Create a folder for each blog under the user folder like s9y\users\tom
- In each file of the deployment folder, replace the absolute path s9y/ with a relative path ../../
For example s9y/index.php becomes ../../index.php. (This is the hack)
- Copy the content of the deployment folder to each user's folder
- Add the templates desired in a templates sub-folder of each user's folder
- In IIS admin, create a web site for each user pointing to each user's folder with same IP address and
different host headers
- For each site, create a virtual directory pointing to htmlarea in s9y folder
- If you wanted the same unmodified templates for each user, you could create a virtual directory pointing to the templates folder in the s9y folder instead of copying templates (I have not tried it)

Most works good, main problem I have is I cannot use Spartacus from these user folders to install plugins. I could if I had a site pointing to the main s9y install.

Also a minor problem with the urls of images for the static page list tree, solved by having a virtual directory in each user site called plugins and pointing to the plugins folder of the s9y folder.
JPhilip
Regular
Posts: 8
Joined: Mon Jul 07, 2008 9:45 pm

mod_rewrite url rewriting on IIS

Post by JPhilip »

I have been using mod_rewrite url rewriting on my IIS installation and I thought it may help some people to share it:

IIS does not come with mod_rewrite like Apache, but you can get a free add on to do mostly the same URL rewrite things.
It is called Isapi Ionic Rewrite Filter.
There are details on how to set it up on the distribution, but basically, this is how:

- Copy 2 files on your server, IsapiRewrite4.dll and IsapiRewrite4.ini
In my share sy9 installation, I only need one copy in the Sy9 main installation folder because I use the same rewrite rules for all blogs, but you could have one set in each blog folder for different rules.

- In IIS console, go the the properties sheet of each blog site and install the ISAPI filter IsapiRewrite4.dll

- Modify the IsapiRewrite4.ini with the rules, the syntax is very similar to the .htaccess file
For my rather standard set of rules, the IsapiRewrite4.ini file reads:

Code: Select all

RewriteRule ^/((archives/([0-9]+)-[0-9a-zA-Z\.\_!;,\+\-\%]+\.html)/?) /index.php?/$1 [NC,L,QSA]
RewriteRule ^/(authors/([0-9]+)-[0-9a-zA-Z\.\_!;,\+\-\%]+) /index.php?/$1 [NC,L,QSA]
RewriteRule ^/(feeds/categories/([0-9;]+)-[0-9a-zA-Z\.\_!;,\+\-\%]+\.rss) /index.php?/$1 [NC,L,QSA]
RewriteRule ^/(feeds/authors/([0-9]+)-[0-9a-zA-Z\.\_!;,\+\-\%]+\.rss) /index.php?/$1 [NC,L,QSA]
RewriteRule ^/(categories/([0-9;]+)-[0-9a-zA-Z\.\_!;,\+\-\%]+) /index.php?/$1 [NC,L,QSA]
RewriteRule ^/archives([/a-zA-Z0-9]+)\.html /index.php?url=/archives/$1.html [NC,L,QSA]
RewriteRule ^/([0-9]+)[_\-][0-9a-zA-Z_\-]*\.html /index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^/feeds/(.*) /index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^/unsubscribe/(.*)/([0-9]+) /index.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^/approve/(.*)/(.*)/([0-9]+) /index.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^/delete/(.*)/(.*)/([0-9]+) /index.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^/(admin|entries)(/.+)? /index.php?url=admin/ [L,QSA]
RewriteRule ^/archive/? /index.php?url=/archive [L,QSA]
RewriteRule ^/(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^/(plugin|plugin)/(.*) /index.php?url=$1/$2 [L,QSA]
RewriteRule ^/search/(.*) /index.php?url=/search/$1 [L,QSA]
RewriteRule ^/comments/(.*) /index.php?url=/comments/$1 [L,QSA]
RewriteRule ^/(serendipity\.css|serendipity_admin\.css) /index.php?url=/$1 [L,QSA]
RewriteRule ^/index\.(html?|php.+) /index.php?url=index.html [L,QSA]
RewriteRule ^/htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule ^/(.*\.html?) /index.php?url=/$1 [L,QSA]
Post Reply