Sha256: 6e612cc8036c7f550c280908f8422134d074ee68b40efd56309d0c5549ff2864

Contents?: true

Size: 1.91 KB

Versions: 2

Compression:

Stored size: 1.91 KB

Contents

##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {
  listen 80 default_server;
  listen [::]:80 default_server ipv6only=on;

  server_name <%= fetch(:server) %>;
  passenger_enabled on;
  rails_env <%= fetch(:stage) %>;
  root <%= fetch(:deploy_to) %>/current/public;

<% if fetch(:stage) == :production %>
  # SSL configuration
  #
  # listen 443 ssl default_server;
  # listen [::]:443 ssl default_server;
  #
  # ssl_certificate /etc/ssl/certs/$server_name.chained.crt;
  # ssl_certificate_key /etc/ssl/private/$server_name.key;
  #
  # Self signed certs generated by the ssl-cert package
  # Don't use them in a production server!
  #
  # include snippets/snakeoil.conf;
<% end %>

  client_max_body_size <%= fetch(:nginx_max_body_size) %>;

  error_page 404 /404.html;
  error_page 422 /422.html;
  error_page 500 502 503 504 /500.html;

  if ($host = www.$server_name) {
    return 301 $scheme://$server_name$request_uri;
  }

<% fetch(:nginx_assets_dirs).each do |dir| %>
  location /<%= dir %>/ {
    gzip_static on;
    expires 1M;
    add_header Cache-Control public;
    access_log off;
  }
<% end %>
}

# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#  listen 80;
#  listen [::]:80;
#
#  server_name example.com;
#
#  root /var/www/example.com;
#  index index.html;
#
#  location / {
#    try_files $uri $uri/ =404;
#  }
#}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
o2webappizer-0.1.15 templates/config/nginx.app.conf.erb
o2webappizer-0.1.14 templates/config/nginx.app.conf.erb