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
| import os | |
| import sys | |
| import site | |
| # Add the site-packages of the chosen virtualenv to work with | |
| site.addsitedir('/home/fellipeh/.virtualenvs/dig/local/lib/python2.7/site-packages') | |
| # Add the app's directory to the PYTHONPATH | |
| sys.path.append('/var/www/django/dig') | |
| sys.path.append('/var/www/django/dig/dig') |
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
| # -*- coding: utf-8 -*- | |
| __author__ = 'fellipeh' | |
| __copyright__ = '' | |
| __version__ = '' | |
| from django.conf.urls import patterns, include, url | |
| from django.contrib import admin | |
| admin.autodiscover() |
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
| <VirtualHost *:80> | |
| ServerAdmin contato@dig.com.br | |
| ServerName dig.com.br | |
| ServerAlias www.dig.com.br | |
| WSGIScriptAlias / var/www/django/dig/dig/wsgi.py | |
| Alias /static/ /var/www/django/dig/dig/static_files/ | |
| <Location "/static/"> | |
| Options -Indexes | |
| </Location> |
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
| <VirtualHost *:80> | |
| ServerAdmin contato@dig.com.br | |
| ServerName dig | |
| Alias /site_media/ /var/django/dig/app/dig/static | |
| Alias /static /var/django/dig/app/dig/static | |
| Alias /static/admin /var/django/dig/app/dig/static/admin | |
| Alias /robots.txt /var/django/dig/app/dig/static_files/robots.txt | |
| Alias /favicon.ico /var/django/dig/app/dig/static_files/favicon.ico |
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
| Mutex file:${APACHE_LOCK_DIR} default | |
| PidFile ${APACHE_PID_FILE} | |
| Timeout 300 | |
| KeepAlive On | |
| MaxKeepAliveRequests 100 | |
| KeepAliveTimeout 5 | |
| User ${APACHE_RUN_USER} | |
| Group ${APACHE_RUN_GROUP} | |
| HostnameLookups Off | |
| ErrorLog ${APACHE_LOG_DIR}/error.log |
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
| <VirtualHost *:80> | |
| ServerAdmin contato@digs.com.br | |
| ServerName teste.digs.com.br | |
| ServerAlias teste.digs.com.br | |
| Alias /site_media/ /var/django/digerp/teste/app/digerp/static | |
| #Alias /static /var/django/digerp/teste/app/digerp/static | |
| #Alias /static/admin /var/django/digerp/teste/app/digerp/static/admin | |
| Alias /static /var/www/static | |
| Alias /static/admin /var/www/static/admin |
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
| #!/bin/bash | |
| NAME="digitumsoft" # Name of the application | |
| DJANGODIR=/var/django/dig/dig # Django project directory | |
| SOCKFILE=/var/django/run/dig_gunicorn.sock # we will communicte using this unix socket | |
| USER=webapps # the user to run as | |
| GROUP=webapps # the group to run as | |
| NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
| DJANGO_SETTINGS_MODULE=dig.settings # which settings file should Django use | |
| DJANGO_WSGI_MODULE=wsgi # WSGI module name |
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 dig_app_server { | |
| # fail_timeout=0 means we always retry an upstream even if it failed | |
| # to return a good HTTP response (in case the Unicorn master nukes a | |
| # single worker for timing out). | |
| server unix:/var/django/run/digsoft_gunicorn.sock fail_timeout=0; | |
| } | |
| server { |
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 site { | |
| server unix:/var/django/run/digsoft_gunicorn.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| server_name digsoft.com.br www.digsoft.com.br; | |
| charset utf-8; | |
| access_log /var/django/logs/digsoft-access.log; | |
| error_log /var/django/logs/digsoft-error.log; |
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
| # See /usr/share/postfix/main.cf.dist for a commented, more complete version | |
| # Debian specific: Specifying a file name will cause the first | |
| # line of that file to be used as the name. The Debian default | |
| # is /etc/mailname. | |
| #myorigin = /etc/ mailname | |
| smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) | |
| biff = no |
OlderNewer