Skip to content

Instantly share code, notes, and snippets.

@nesquena
Last active February 28, 2020 11:35
Show Gist options
  • Save nesquena/485042 to your computer and use it in GitHub Desktop.
Save nesquena/485042 to your computer and use it in GitHub Desktop.
nginx configuration
worker_processes 4;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
# Passenger Global Configurations
include /opt/nginx/conf/includes/passenger.conf;
# Basic Nginx Configuration
include /opt/nginx/conf/includes/base.conf;
# Gzip Compression Configuration
include /opt/nginx/conf/includes/gzip.conf;
# Redirects and Rewrite Rules
include /opt/nginx/conf/includes/rewrites.conf;
# Application Server
server {
listen 80;
server_name railsapp.com localhost;
root /var/apps/rails_app/current/public;
include /opt/nginx/conf/includes/server.conf;
}
# Secure Server
server {
listen 443;
server_name railsapp.com;
root /var/apps/railsapp/current/public;
include /opt/nginx/conf/includes/server.conf;
include /opt/nginx/conf/includes/ssl.conf;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment