IIS SSI's?
June 29, 2009 1:31 PM Subscribe
How do I get Server Side Includes working in pages with a .htm extension on IIS?
It's supposed to be straight forward—you pretty much just add the extension according to every resource I can find online—but it's just not working.
I'm working indirectly with the server, I have to go through an admin that doesn't know much about the specifics of IIS and I'm an Apache guy.
Initially they weren't working at all, until the server admin found a universal kill switch somewhere that disabled SSI's on all sites. Now they work fine if I use an .shtm extension, but not .htm even though that extension has been set up.
Is there somewhere else I need to look?
It's supposed to be straight forward—you pretty much just add the extension according to every resource I can find online—but it's just not working.
I'm working indirectly with the server, I have to go through an admin that doesn't know much about the specifics of IIS and I'm an Apache guy.
Initially they weren't working at all, until the server admin found a universal kill switch somewhere that disabled SSI's on all sites. Now they work fine if I use an .shtm extension, but not .htm even though that extension has been set up.
Is there somewhere else I need to look?
I doubt this will be much help, but two thoughts:
One, you did restart IIS after making the changes, right?
Two, it has been my experience, more often than not, that when you make changes like that in IIS, and hit apply and save and all that, it doesn't actually "take" the first time. It's a mystery to me why not; I'm used to OSes where stuff like that works the first time. But many, many times I've had a sysadmin swear up and down to me that they've changed a setting, I've pleaded with them to "just do it again," and, lo and behold, second time's the charm.
posted by bricoleur at 4:07 PM on June 29, 2009
One, you did restart IIS after making the changes, right?
Two, it has been my experience, more often than not, that when you make changes like that in IIS, and hit apply and save and all that, it doesn't actually "take" the first time. It's a mystery to me why not; I'm used to OSes where stuff like that works the first time. But many, many times I've had a sysadmin swear up and down to me that they've changed a setting, I've pleaded with them to "just do it again," and, lo and behold, second time's the charm.
posted by bricoleur at 4:07 PM on June 29, 2009
Response by poster: Sorry, IIS 6, and yes we did give the whole server instance a reboot... but I guess we could try again!
posted by Mr. Anthropomorphism at 4:34 PM on June 29, 2009
posted by Mr. Anthropomorphism at 4:34 PM on June 29, 2009
Best answer:
posted by adipocere at 7:12 AM on June 30, 2009
- Navigate to "Web Service Extensions"
- Be sure to make the following "allowed" by right-clicking on them:
- Active Server Pages
- Perl CGI Extension
- Perl ISAPI Extension
- PerlEx ISAPI Extension
- Server Side Includes
- Make sure the following are disallowed by right-clicking on them:
- All Unknown CGI Extensions
- All Unknown ISAPI Extensions
- FrontPage Server Extensions
- Internet Data Connector
- WebDAV
- Be sure to make the following "allowed" by right-clicking on them:
- Right-click on "Web Sites" and select "Properties."
- "Web Site" tab
- Click the "Properties" button in the logging section
- In the "General" tab, make sure that "Daily" is checked.
- In the "Advanced" tab, make sure all of the extended properties are checked except "Cookie."
- Click the "OK" button.
- Click the "Properties" button in the logging section
- "Documents" tab
- Check "Enable the default content page."
- "Add" and sort the content page until the order is as follows:
index.html
index.htm
index.pl
index.asp
default.html
default.htm
default.asp
default.pl
- "Directory Security" tab
- Under "Authentication and access control," click on "Edit."
- Make sure "Enable anonymous access" is checked.
- Make sure that the user name is "
redacted," which matches the permissions scripts below. - Make sure that the "Integrated Windows authentication" is checked.
- Click the "OK" button.
www.site.com
- "Web Site" tab
- "Description" should be
www.site.com
- Click the "Advanced" button and make sure the following entries are present:
"256.256.256.256", "80", "www.site.com"
(obviously a fake IP)"256.256.256.256", "80", ""
(obviously a fake IP)
- Click the "Properties" button in the logging section
- In the "General" tab, browse to
Y:\srv\www.site.com\logs
for the logs. - Click the "OK" button.
- In the "General" tab, browse to
- "Description" should be
- "Home Directory" tab
- Browse to
Y:\srv\www.site.com\www\html
- Make sure that only "Read" and "Log visits" are checked
- Uncheck the "Script source access" box.
- Click the "Configuration" button.
- Remove all extensions (to taste) except:
.asp
.aspx
.pl
- Add an extension
.html
like:- Executable:
%SystemDrive%\WINDOWS\system32\inetsrv\ssinc.dll
(or the most appropriate SSI-capable DLL) - Extension:
.html
- Verbs: Limit to:
GET,POST
- Script engine: Checked
- Verify that file exists: Checked
- Click the "OK" button.
- Repeat the previous steps for the
.htm
and.inc
extensions.
- Executable:
- Click the "OK" button.
- Remove all extensions (to taste) except:
- Browse to
- Change "Execute Permissions" to "Scripts Only."
- "Web Site" tab
posted by adipocere at 7:12 AM on June 30, 2009
Response by poster: Marvelous, I've sent that along to Mr. Administrator. We'll find out if it works, but the above deserves a best answer for effort alone!
adipocere also answered my question via MeMail about using the ssinc.dll vs asp.dll:
For security reasons, I use the ssinc.dll rather than the ASP dll because, since ssinc.dll has only a subset of the fuctions of the ASP.dll, it should theoretically have fewer bugs and therefore fewer exploits. It's all very hypothetical, but there you go.
posted by Mr. Anthropomorphism at 8:14 AM on June 30, 2009
adipocere also answered my question via MeMail about using the ssinc.dll vs asp.dll:
For security reasons, I use the ssinc.dll rather than the ASP dll because, since ssinc.dll has only a subset of the fuctions of the ASP.dll, it should theoretically have fewer bugs and therefore fewer exploits. It's all very hypothetical, but there you go.
posted by Mr. Anthropomorphism at 8:14 AM on June 30, 2009
This thread is closed to new comments.
It's usually Windows 2008:IIS 7. IIS 4 - 6 are very similar.
posted by adipocere at 1:37 PM on June 29, 2009