Sha256: 9c357cd0a702ccd1af4f2858fbf68a67b6be6d676b4f7444eeb96730717a01e4

Contents?: true

Size: 1.52 KB

Versions: 10

Compression:

Stored size: 1.52 KB

Contents

upstream thin {
  ip_hash;
  server unix:/tmp/thin.0.sock;
#  server unix:/tmp/thin.1.sock;
}
<% hostname = hostnames.split('_')[0] %>
server {
  listen      80 default;
  server_name <%= hostnames %>;
  root        <%= rmails_root %>/public;

  #ssl on;
  #ssl_certificate /etc/ssl/certs/https.pem
  #ssl_certificate_key /etc/ssl/private/https.pem

  if ($request_method !~ ^(GET|HEAD|PUT|POST|DELETE|OPTIONS)$ ){
    return 405;
  }
  #if ($host = '<%#= subhostname %><%= hostname %>' ) {
  #  rewrite  ^/(.*)$  http://<%= '' %><%= hostname %>/$1  permanent;
  #}

  location ~ ^/s/(.*)$ {
    alias  <%= awstats_out||'/var/awstats' %>/.html/$1;
  }
  location / {
    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;

    #if (-f $request_filename/index.html) {
    #   rewrite (.*) $1/index.html break;
    #}

    #if (-f $request_filename.html) {
    #   rewrite (.*) $1.html break;
    #}

    #if (!-f $request_filename) {
       proxy_pass http://thin;
    #   break;
    #}
    try_files $uri @rmails;
  }
  location @rmails {
    proxy_pass http://thin;
  }
  location ~* \.(gz|ico|pdf|jpg|jpeg|gif|png|css|js|swf|html)$ {
    if (-f $request_filename) {
      expires max;
      break;
		  #add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    }
  }



  access_log /var/log/nginx/<%= hostname %>/access.log;
  error_log /var/log/nginx/<%= hostname %>/error.log;

  error_page   500 502 504  /500.html;
}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rmails-0.2.5 system/dist/nginx/rmails.erb
rmails-0.2.4 system/dist/nginx/rmails.erb
rmails-0.2.3 system/dist/nginx/rmails.erb
rmails-0.2.2 system/dist/nginx/rmails.erb
rmails-0.2.1 system/dist/nginx/rmails.erb
rmails-0.2.0 system/dist/nginx/rmails.erb
rmails-0.1.6 system/dist/nginx/rmails.erb
rmails-0.1.5 system/dist/nginx/rmails.erb
rmails-0.1.4 system/dist/nginx/rmails.erb
rmails-0.1.3 system/dist/nginx/rmails.erb