| 1 | <h2>Comments</h2> |
| 2 | <pre><code># This is a comment</code></pre> |
| 3 | |
| 4 | <h2>Variables</h2> |
| 5 | <pre><code>fastcgi_param SERVER_NAME $server_name;</code></pre> |
| 6 | |
| 7 | <h2>Server Block</h2> |
| 8 | <pre><code> |
| 9 | server { # simple reverse-proxy |
| 10 | listen 80; |
| 11 | server_name domain2.com www.domain2.com; |
| 12 | access_log logs/domain2.access.log main; |
| 13 | |
| 14 | # serve static files |
| 15 | |
| 16 | location ~ ^/(images|javascript|js|css|flash|media|static)/ { |
| 17 | root /var/www/virtual/big.server.com/htdocs; |
| 18 | expires 30d; |
| 19 | } |
| 20 | |
| 21 | # pass requests for dynamic content to rails/turbogears/zope, et al |
| 22 | location / { |
| 23 | proxy_pass http://127.0.0.1:8080; |
| 24 | } |
| 25 | } |
| 26 | </code></pre> |