3

I want to use server-side includes so I can include header and footer files on my personal portfolio. I've been using the Python SimpleHTTPServer because I had the command handy, so I know how to run it.

My server-side includes don't currently work. My understanding is that, based on this article, I would need to configure my SimpleHTTPServer to allow for server-side includes. I haven't been able to find this information anywhere, so I'm thinking that I need to I use a different web server. Can someone clarify?

If I have to use a different web server, I'd love to hear any suggestions. I'm a noob so something simple would be great. Also, it'd be helpful if you could provide: (1) any good tutorials for making any of the necessary config changes so I can run SSI; (2) the command I run to start the server (so I can make an alias). I looked briefly at Apache stuff, but seems very intimidating. I'm wondering if there is a more noob-friendly way. I'm trying to build a personal portfolio, not do anything crazy.

Thanks for your help!

user422318
  • 191
  • 3
  • 3
  • 11

1 Answers1

1

I found ssi-server by Googling for "ssi python". It says it provides "Server Side Includes in Python's SimpleHTTPServer" and looks like it might work for you.

Do you have to use Server Side Includes? Since you're using python, there are lot of options for doing this kind of functionality. For example, you could just use python's string manipulation to join the files together (e.g. with the str.format method). Or you could use a templating language like jinja2, mako, etc.

What SSI features are you depending on? Or do you have some existing SSI files that you want to use as-is?

Steven Kryskalla
  • 14,179
  • 2
  • 40
  • 42