Skip to content

Instantly share code, notes, and snippets.

@ankit8898
Created May 24, 2017 07:07
Show Gist options
  • Save ankit8898/d52335e7f7dd8dc27d5db7cd299770a0 to your computer and use it in GitHub Desktop.
Save ankit8898/d52335e7f7dd8dc27d5db7cd299770a0 to your computer and use it in GitHub Desktop.
passenger-5.0.22 default nginx conf
##########################################################################
# Passenger Standalone is built on the same technology that powers
# Passenger for Nginx, so any configuration option supported by Passenger
# for Nginx can be applied to Passenger Standalone as well. You can do
# this by direct editing the Nginx configuration template that is used by
# Passenger Standalone.
#
# This file is the original template. DO NOT EDIT THIS FILE DIRECTLY.
# Instead, make a copy of this file and pass the `--nginx-config-template`
# parameter to Passenger Standalone.
#
# Learn more about using the Nginx configuration template at:
# https://www.phusionpassenger.com/library/config/standalone/intro.html#nginx-configuration-template
#
# *** NOTE ***
# If you customize the template file, make sure you keep an eye on the
# original template file and merge any changes. New Phusion Passenger
# features may require changes to the template file.
##############################################################
master_process on;
daemon on;
error_log '/Users/agupta/Documents/projects/work/FESL/log/passenger.8080.log' ;
pid '/Users/agupta/Documents/projects/work/FESL/tmp/passenger.8080.pid';
worker_processes 1;
events {
worker_connections 1024;
}
http {
log_format debug '[$time_local] $msec "$request" $status conn=$connection sent=$bytes_sent body_sent=$body_bytes_sent';
include '/Users/agupta/.rvm/gems/ruby-2.3.1/gems/passenger-5.0.22/resources/mime.types';
passenger_root '/Users/agupta/.rvm/gems/ruby-2.3.1/gems/passenger-5.0.22';
passenger_abort_on_startup_error on;
passenger_ctl cleanup_pidfiles L3Zhci9mb2xkZXJzL3g4L3RmN21rbm0xMm01XzNjNjA2Z2t0NDg3eG4zOXJ5ay9UL3Bhc3Nlbmdlci1zdGFuZGFsb25lLnhsZmdkdS90ZW1wX2Rpcl90b3VjaGVyLnBpZA==;
passenger_ctl integration_mode standalone;
passenger_ctl standalone_engine nginx;
passenger_user_switching off;
passenger_ruby /Users/agupta/.rvm/gems/ruby-2.3.1/wrappers/ruby;
passenger_user agupta;
passenger_default_user agupta;
passenger_analytics_log_user agupta;
passenger_log_level 3;
passenger_max_pool_size 1;
passenger_pool_idle_time 0;
### BEGIN your own configuration options ###
# This is a good place to put your own config
# options. Note that your options must not
# conflict with the ones Passenger already sets.
# Learn more at:
# https://www.phusionpassenger.com/library/config/standalone/intro.html#nginx-configuration-template
### END your own configuration options ###
default_type application/octet-stream;
types_hash_max_size 2048;
server_names_hash_bucket_size 64;
client_max_body_size 1024m;
access_log off;
keepalive_timeout 60;
underscores_in_headers on;
gzip on;
gzip_comp_level 3;
gzip_min_length 150;
gzip_proxied any;
gzip_types text/plain text/css text/json text/javascript
application/javascript application/x-javascript application/json
application/rss+xml application/vnd.ms-fontobject application/x-font-ttf
application/xml font/opentype image/svg+xml text/xml;
server {
server_name _;
listen 0.0.0.0:3050;
root '/Users/agupta/Documents/projects/work/FESL/public';
passenger_app_root '/Users/agupta/Documents/projects/work/FESL';
passenger_enabled on;
passenger_app_env 'production';
passenger_spawn_method 'smart';
passenger_min_instances 1;
passenger_max_request_queue_size 500;
# Rails asset pipeline support.
location ~ "^/assets/.+-([0-9a-f]{32}|[0-9a-f]{64})\..+" {
error_page 490 = @static_asset;
error_page 491 = @dynamic_request;
recursive_error_pages on;
if (-f $request_filename) {
return 490;
}
if (!-f $request_filename) {
return 491;
}
}
location @static_asset {
gzip_static on;
expires max;
add_header Cache-Control public;
add_header ETag "";
}
location @dynamic_request {
passenger_enabled on;
}
### BEGIN your own configuration options ###
# This is a good place to put your own config
# options. Note that your options must not
# conflict with the ones Passenger already sets.
# Learn more at:
# https://www.phusionpassenger.com/library/config/standalone/intro.html#nginx-configuration-template
### END your own configuration options ###
}
passenger_pre_start http://0.0.0.0:3050/;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment