Last active
February 28, 2020 11:35
-
-
Save nesquena/485042 to your computer and use it in GitHub Desktop.
nginx configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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