Website is working behind apache2 / mod_wsgi in daemon mode.
Only the homepage loads correctly at the moment. Need to get the static files thing sorted, still.
This commit is contained in:
parent
4e87b63c60
commit
42ebbd06a1
3 changed files with 98 additions and 30 deletions
37
2017.pycon-au.org.conf
Normal file
37
2017.pycon-au.org.conf
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
WSGIPythonPath /srv/http/uat.2017.pycon-au.org/symposion/website:/srv/http/uat.2017.pycon-au.org/symposion/lib/python2.7/site-packages
|
||||||
|
|
||||||
|
<VirtualHost 192.55.98.190:80>
|
||||||
|
ServerAdmin webmaster@pycon-au.org
|
||||||
|
ServerName uat2017.pycon-au.org
|
||||||
|
ServerAlias uat2017.pycon-au.org
|
||||||
|
|
||||||
|
Alias /favicon.ico /srv/http/uat.2017.pycon-au.org/symposion/website/static/dist/pyconau2017/images/favicon.ico
|
||||||
|
Alias /site_media/static/pyconau2017/ /srv/http/uat.2017.pycon-au.org/symposion/website/static/dist/pyconau2017/
|
||||||
|
|
||||||
|
<Directory /srv/http/uat.2017.pycon-au.org/symposion/website/static/dist/pyconau2017>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
# Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
WSGIDaemonProcess uat2017.pycon-au.org python-path="/srv/http/uat.2017.pycon-au.org/symposion/website:/srv/http/uat.2017.pycon-au.org/symposion/lib/python2.7/site-packages" home=/srv/http/uat.2017.pycon-au.org/symposion/website user=nicks group=www-data
|
||||||
|
WSGIProcessGroup uat2017.pycon-au.org
|
||||||
|
|
||||||
|
<Directory /srv/http/uat.2017.pycon-au.org/symposion/website>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
# Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
WSGIScriptAlias / /srv/http/uat.2017.pycon-au.org/symposion/website/pinaxcon/wsgi.py
|
||||||
|
|
||||||
|
ErrorLog /srv/http/uat.2017.pycon-au.org/log/error.log
|
||||||
|
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit,
|
||||||
|
# alert, emerg.
|
||||||
|
LogLevel debug
|
||||||
|
|
||||||
|
CustomLog /srv/http/uat.2017.pycon-au.org/log/access.log combined
|
||||||
|
ServerSignature On
|
||||||
|
</VirtualHost>
|
||||||
|
|
|
@ -22,7 +22,7 @@ CACHES = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = []
|
ALLOWED_HOSTS = ['uat2017.pycon-au.org']
|
||||||
|
|
||||||
# Local time zone for this installation. Choices can be found here:
|
# Local time zone for this installation. Choices can be found here:
|
||||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||||
|
@ -218,35 +218,66 @@ INSTALLED_APPS = [
|
||||||
"django_nose",
|
"django_nose",
|
||||||
]
|
]
|
||||||
|
|
||||||
# A sample logging configuration. The only tangible logging
|
|
||||||
# performed by this configuration is to send an email to
|
|
||||||
# the site admins on every HTTP 500 error when DEBUG=False.
|
|
||||||
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
|
||||||
# more details on how to customize your logging configuration.
|
|
||||||
LOGGING = {
|
|
||||||
"version": 1,
|
|
||||||
"disable_existing_loggers": False,
|
|
||||||
"filters": {
|
|
||||||
"require_debug_false": {
|
|
||||||
"()": "django.utils.log.RequireDebugFalse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"handlers": {
|
|
||||||
"mail_admins": {
|
|
||||||
"level": "ERROR",
|
|
||||||
"filters": ["require_debug_false"],
|
|
||||||
"class": "django.utils.log.AdminEmailHandler"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"loggers": {
|
|
||||||
"django.request": {
|
|
||||||
"handlers": ["mail_admins"],
|
|
||||||
"level": "ERROR",
|
|
||||||
"propagate": True,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
LOGGING = {
|
||||||
|
'version': 1,
|
||||||
|
'disable_existing_loggers': False,
|
||||||
|
'formatters': {
|
||||||
|
'verbose': {
|
||||||
|
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
|
||||||
|
},
|
||||||
|
'simple': {
|
||||||
|
'format': '%(levelname)s %(message)s'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'filters': {
|
||||||
|
'require_debug_false': {
|
||||||
|
'()': 'django.utils.log.RequireDebugFalse'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'handlers': {
|
||||||
|
# 'null': {
|
||||||
|
# 'level':'DEBUG',
|
||||||
|
# 'class':'django.utils.log.NullHandler',
|
||||||
|
# },
|
||||||
|
'console':{
|
||||||
|
'level': 'DEBUG',
|
||||||
|
'class': 'logging.StreamHandler',
|
||||||
|
'formatter': 'simple'
|
||||||
|
},
|
||||||
|
# I always add this handler to facilitate separating loggings
|
||||||
|
'log_file':{
|
||||||
|
'level': 'DEBUG',
|
||||||
|
'class': 'logging.handlers.RotatingFileHandler',
|
||||||
|
'filename': os.path.join('/srv/http/uat.2017.pycon-au.org', 'log/django.log'),
|
||||||
|
'maxBytes': '16777216', # 16megabytes
|
||||||
|
'formatter': 'verbose'
|
||||||
|
},
|
||||||
|
'mail_admins': {
|
||||||
|
'level': 'ERROR',
|
||||||
|
'filters': ['require_debug_false'],
|
||||||
|
'class': 'django.utils.log.AdminEmailHandler',
|
||||||
|
'include_html': True,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'loggers': {
|
||||||
|
'django.request': {
|
||||||
|
'handlers': ['mail_admins'],
|
||||||
|
'level': 'DEBUG',
|
||||||
|
'propagate': True,
|
||||||
|
},
|
||||||
|
'apps': { # I keep all my of apps under 'apps' folder, but you can also add them one by one, and this depends on how your virtualenv/paths are set
|
||||||
|
'handlers': ['log_file'],
|
||||||
|
'level': 'DEBUG',
|
||||||
|
'propagate': True,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
# you can also shortcut 'loggers' and just configure logging for EVERYTHING at once
|
||||||
|
'root': {
|
||||||
|
'handlers': ['console', 'mail_admins'],
|
||||||
|
'level': 'DEBUG'
|
||||||
|
},
|
||||||
|
}
|
||||||
FIXTURE_DIRS = [
|
FIXTURE_DIRS = [
|
||||||
os.path.join(PROJECT_ROOT, "fixtures"),
|
os.path.join(PROJECT_ROOT, "fixtures"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -15,7 +15,7 @@ import symposion.views
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
#url(r"^$", TemplateView.as_view(template_name="homepage.html"), name="home"),
|
url(r"^$", TemplateView.as_view(template_name="pyconau2017-homepage.html"), name="home"),
|
||||||
url(r"^admin/", include(admin.site.urls)),
|
url(r"^admin/", include(admin.site.urls)),
|
||||||
|
|
||||||
url(r"^account/", include("account.urls")),
|
url(r"^account/", include("account.urls")),
|
||||||
|
|
Loading…
Reference in a new issue