-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
98 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,64 @@ | ||
# | ||
# si ca chie, ping Speedking @zestedesavoir.com | ||
# | ||
|
||
|
||
# Redirect www.domain.tld to domain.tld | ||
#server { | ||
# listen 80; | ||
# server_name www.example.com; | ||
# server_name www.iteam.org; | ||
# | ||
# return 301 http://example.com$request_uri; | ||
# return 301 http://iteam.org$request_uri; | ||
#} | ||
|
||
server { | ||
listen 80; | ||
server_name beta.iteam.org; | ||
|
||
# log | ||
access_log /opt/iteam-env/log/nginx-access.log; | ||
error_log /opt/iteam-env/log/nginx-error.log; | ||
|
||
|
||
# media and static files | ||
|
||
location /static/ { | ||
alias /opt/iteam-env/static/; | ||
root /opt/iteam-env; | ||
expires 1d; | ||
add_header Pragma public; | ||
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | ||
} | ||
|
||
location /media/ { | ||
alias /opt/iteam-env/media/; | ||
root /opt/iteam-env; | ||
expires 1d; | ||
add_header Pragma public; | ||
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | ||
} | ||
|
||
# misc | ||
location /favicon.ico { | ||
root /opt/iteam-env/iteam-site/static/images/; | ||
root /opt/iteam-env/static/images; | ||
} | ||
|
||
location /robots.txt { | ||
root /opt/iteam-env/iteam-site/static/; | ||
root /opt/iteam-env/static; | ||
} | ||
|
||
# bind 503 to maintenance.html | ||
error_page 503 /maintenance.html; | ||
|
||
# return 503 for all requests | ||
location / { | ||
return 503; | ||
# Error pages | ||
error_page 500 501 502 503 504 /500.html; | ||
location = /500.html { | ||
root /opt/iteam-env/iteam-site/templates; | ||
} | ||
|
||
# serve maintenance.html | ||
# bind 503 to maintenance.html + location of maintenance.html | ||
error_page 503 /maintenance.html; | ||
|
||
location /maintenance.html { | ||
root /opt/iteam-env/iteam-site/templates/; | ||
root /opt/iteam-env/iteam-site/templates; | ||
} | ||
|
||
################################################################################ | ||
|
||
# Error pages | ||
|
||
error_page 500 501 502 503 504 /500.html; | ||
location = /500.html { | ||
root /opt/iteam-env/iteam-site/templates/; | ||
# serve maintenance.html | ||
location / { | ||
return 503; | ||
} | ||
} | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,31 +4,28 @@ | |
import os | ||
SITE_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__))) | ||
|
||
################################ | ||
# Basic and misc | ||
################################ | ||
|
||
DEBUG = False | ||
TEMPLATE_DEBUG = False | ||
SERVE = False | ||
|
||
|
||
ALLOWED_HOSTS = ['localhost'] | ||
|
||
# Make this unique, and don't share it with anybody. | ||
# SECURITY WARNING: keep the secret key used in production secret! | ||
SECRET_KEY = 'z3rte+c4hikqi-csxbs2&j#+5%nwwbe=ki0j957a^i1%k-hs^^' | ||
|
||
################################ | ||
# Static and media | ||
################################ | ||
|
||
ADMINS = (('Adrien Chardon', '[email protected]'),) | ||
SERVER_EMAIL = '[email protected]' | ||
EMAIL_HOST = 'mail.mailoo.org' | ||
EMAIL_HOST_USER = '**********' | ||
EMAIL_HOST_PASSWORD = '*********' | ||
EMAIL_PORT = 25 | ||
|
||
|
||
STATIC_ROOT = os.path.join(SITE_ROOT, '..', 'static') | ||
STATIC_ROOT = '/opt/iteam-env/static' | ||
STATIC_URL = '/static/' | ||
|
||
MEDIA_ROOT = os.path.join(SITE_ROOT, '..', 'media') | ||
MEDIA_ROOT = '/opt/iteam-env/media' | ||
MEDIA_URL = '/media/' | ||
|
||
STATICFILES_DIRS = ( | ||
|
@@ -37,9 +34,45 @@ | |
('images', os.path.join(SITE_ROOT, 'assets', 'images')), | ||
) | ||
|
||
################################ | ||
# Database | ||
################################ | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': os.path.join(SITE_ROOT, 'db.sqlite3'), | ||
} | ||
} | ||
|
||
################################ | ||
# Email and errors report | ||
################################ | ||
|
||
EMAIL_HOST = 'mail.mailoo.org' | ||
EMAIL_HOST_USER = '**********' | ||
EMAIL_HOST_PASSWORD = '*********' | ||
EMAIL_PORT = 25 | ||
|
||
# Email address that error messages come from. | ||
SERVER_EMAIL = '[email protected]' | ||
# Default email address to use for various automated correspondence from the site managers. | ||
DEFAULT_FROM_EMAIL = '[email protected]' | ||
|
||
# Subject-line prefix for email messages send with django.core.mail.mail_admins or ...mail_managers. | ||
# Make sure to include the trailing space. | ||
EMAIL_SUBJECT_PREFIX = '[Django] ' | ||
|
||
# People who get code error notifications. | ||
ADMINS = (('John Doe', '[email protected]'),) | ||
# Not-necessarily-technical managers of the site. They get broken link notifications and other various emails. | ||
MANAGERS = ADMINS | ||
|
||
# Whether to send broken-link emails. Deprecated, must be removed in 1.8. | ||
SEND_BROKEN_LINK_EMAILS = False | ||
|
||
#IGNORABLE_404_URLS = ( | ||
# re.compile(r'^/apple-touch-icon.*\.png$'), | ||
# re.compile(r'^/favicon.ico$'), | ||
# re.compile(r'^/robots.txt$'), | ||
# ) |