<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.nginx.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.nginx.org/index.php?title=DynamicSSIExample&amp;feed=atom&amp;action=history</id>
		<title>DynamicSSIExample - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.nginx.org/index.php?title=DynamicSSIExample&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=DynamicSSIExample&amp;action=history"/>
		<updated>2013-05-22T22:46:43Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.0</generator>

	<entry>
		<id>http://wiki.nginx.org/index.php?title=DynamicSSIExample&amp;diff=376&amp;oldid=prev</id>
		<title>MichaelLustfield at 05:21, 23 November 2010</title>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=DynamicSSIExample&amp;diff=376&amp;oldid=prev"/>
				<updated>2010-11-23T05:21:31Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;It took me a little while to figure this out and it's handy for creating one-off sites with &amp;quot;dynamic&amp;quot; content without a web framework.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
user nginx;&lt;br /&gt;
worker_processes  1;&lt;br /&gt;
&lt;br /&gt;
events {&lt;br /&gt;
    worker_connections  1024;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
http {&lt;br /&gt;
    include       mime.types;&lt;br /&gt;
    default_type  application/octet-stream;&lt;br /&gt;
&lt;br /&gt;
    sendfile      on;&lt;br /&gt;
    tcp_nopush    on;&lt;br /&gt;
    keepalive_timeout 10;&lt;br /&gt;
    gzip          on;&lt;br /&gt;
&lt;br /&gt;
    server {&lt;br /&gt;
        server_name  localhost;&lt;br /&gt;
        charset      utf-8;&lt;br /&gt;
        access_log   /var/log/nginx/access.log;&lt;br /&gt;
&lt;br /&gt;
        root    /var/www;&lt;br /&gt;
&lt;br /&gt;
        location = / {&lt;br /&gt;
            rewrite ^ /home redirect;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        location / {&lt;br /&gt;
            ssi on;&lt;br /&gt;
            set $inc $request_uri;&lt;br /&gt;
            if (!-f $request_filename) { &lt;br /&gt;
                rewrite ^ /index.html last;     &lt;br /&gt;
            }&lt;br /&gt;
            if (!-f $document_root$inc.html) {&lt;br /&gt;
                return 404;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then if you have an index.html file similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;!--# include file=&amp;quot;$inc.html&amp;quot; --&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it will now include (via SSI) whatever page is requested.   So for example /home would include home.html into index.html.  This makes it easy to have a common style (headers and footers) without resorting to PHP or a framework.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It assumes home.html exists.&lt;/div&gt;</summary>
		<author><name>MichaelLustfield</name></author>	</entry>

	</feed>