: previewing SSIs locally in OS X


CubaMark
May 27th, 2003, 05:43 PM
So here's the deal.... I maintain a copy of our organization's website on my hard drive, since as webmaster it's good to preview your updates before FTPing to the server, right?

So we've decided to toss those $%^&U frames, and go with Server-Side Includes (SSIs) instead, which will enable people to bookmark specific pages (which they couldn't do under frames) and also to facilitate site-design changes in the future.

Problem 1: the test files don't work on our server, but that's something I need to work out with the host.

Problem 2: I can't preview SSIs from my hard drive, it seems. At least, not in the way that I used to do it (just load up the main index page in Safari, and 'boom' - it's there!).

The only solution that comes to mind is that I drop my site files into the "Sites" folder of my user subdirectory, and use OS X's built-in Apache webserver to serve up the files... but I'll still need, I believe?, to "turn on" SSIs somehow.

Anyone have some sound words of advice?

M.

monokitty
May 27th, 2003, 10:00 PM
The only solution that comes to mind is that I drop my site files into the "Sites" folder of my user subdirectory, and use OS X's built-in Apache webserver to serve up the files... but I'll still need, I believe?, to "turn on" SSIs somehow.This is not possible. See my explantion below why it isn't. You can't just "turn on" SSI support.

Problem 2: I can't preview SSIs from my hard drive, it seems. At least, not in the way that I used to do it (just load up the main index page in Safari, and 'boom' - it's there!).That's because SSI is not built into browsers. SSI is depentant on a server that supports it. So yes, in order to test SSI, you would need upload the page to a server that supports it.

Problem 1: the test files don't work on our server, but that's something I need to work out with the host.See above. Your server needs to be able to support SSIs in order for them to work (unless you're talking about other files...).

CubaMark
May 27th, 2003, 10:24 PM
Lars,

Could you clarify? Does that mean the Apache webserver that's built into OSX does not support SSIs ??? Surely it must!

My webserver does support them... I just forgot to change the file extension to ".shtml" - silly me. :confused:

The question remains: can I do local previews via Apache on my own HD? I often work in cafes, etc., where there's no WiFI or other connectivity, and not being able to preview would put a serious kink in my web-authoring style, man...

;)

M

jfpoole
May 27th, 2003, 11:34 PM
CubaMark,

There's a good Apache Tutorial on how to enable server-side includes here (http://httpd.apache.org/docs/howto/ssi.html). You'll have to edit /etc/httpd/httpd.conf, then restart the webserver, but it shouldn't be too bad.

Let me know if you have any problems.

CubaMark
May 28th, 2003, 09:10 AM
Thanks, jfpoole, I'll check it out, and report on my progress in the coming days...

:cool:
M

monokitty
May 28th, 2003, 09:54 AM
Lars,

Could you clarify? Does that mean the Apache webserver that's built into OSX does not support SSIs ??? Surely it must!I think it's supported in your browser when surfing web sites online that use SSI, but I don't think the Apacge webserver in OS X supports it offline. Although I'm not the expert, that's what I think.

CubaMark
May 28th, 2003, 03:16 PM
Label this one :cool: man...

With a little help from our friendly community network tech, my Apache now serves up SSIs locally, so I can offline-edit my website.

Wickedly great. Insanely great!

:D
M