Last active
August 29, 2015 13:56
-
-
Save seocam/9135634 to your computer and use it in GitHub Desktop.
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
upstream django_app { | |
server 127.0.0.1:8000; | |
} |
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
nginx::resource::upstream { 'django_app': | |
ensure => present, | |
members => ['127.0.0.1:8000'], | |
} | |
nginx::resource::vhost { 'www.esopedir.com': | |
ensure => present, | |
www_root => '/usr/share/nginx/esopedir', | |
index_files => [], | |
try_files => ['$uri', '@django_app'], | |
server_name => [ | |
'www.esopedir.com', | |
'esopedir.com', | |
'esopedir.tracy.com.br', | |
], | |
} |
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
server { | |
listen *:80; | |
server_name www.esopedir.com esopedir.com esopedir.tracy.com.br; | |
access_log /var/log/nginx/www.esopedir.com.access.log; | |
error_log /var/log/nginx/www.esopedir.com.error.log; | |
location / { | |
root /usr/share/nginx/esopedir; | |
try_files $uri @django_app; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment