some changes for apache2 deployment
This commit is contained in:
parent
58f4467ad0
commit
e7de4008ef
12 changed files with 39 additions and 15 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -57,3 +57,4 @@ docs/_build/
|
|||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
a pragmatic and simple elearning webapp based on python django
|
||||
|
||||
requirements:
|
||||
- python
|
||||
- django
|
||||
- python 2.7
|
||||
- django 1.9
|
||||
- sqlite3
|
||||
- tinymce
|
||||
- tinymce 2.3
|
||||
|
||||
|
|
21
apache2/httpd.conf
Normal file
21
apache2/httpd.conf
Normal file
|
@ -0,0 +1,21 @@
|
|||
WSGIScriptAlias / /var/www/tkupek_elearning/wsgi.py
|
||||
WSGIDaemonProcess elearning user=apache group=nobody processes=10 threads=1
|
||||
WSGIProcessGroup elearning
|
||||
|
||||
Alias /static/ /var/www/tkupek_elearning/elearning/static/
|
||||
|
||||
<Directory /var/www/tkupek_elearning/elearning/static>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
|
||||
<Directory /var/www/tkupek_elearning>
|
||||
Options +FollowSymLinks
|
||||
|
||||
<Files wsgi.py>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Files>
|
||||
</Directory>
|
||||
|
|
@ -8,3 +8,4 @@ if __name__ == "__main__":
|
|||
from django.core.management import execute_from_command_line
|
||||
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
1
tkupek_elearning/elearning/static/admin
Symbolic link
1
tkupek_elearning/elearning/static/admin
Symbolic link
|
@ -0,0 +1 @@
|
|||
/usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin/
|
1
tkupek_elearning/elearning/static/django_tinymce
Symbolic link
1
tkupek_elearning/elearning/static/django_tinymce
Symbolic link
|
@ -0,0 +1 @@
|
|||
/usr/local/lib/python2.7/dist-packages/tinymce/static/django_tinymce/
|
|
@ -207,3 +207,4 @@ function ajaxRequest() {
|
|||
else
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
1
tkupek_elearning/elearning/static/tiny_mce
Symbolic link
1
tkupek_elearning/elearning/static/tiny_mce
Symbolic link
|
@ -0,0 +1 @@
|
|||
/usr/local/lib/python2.7/dist-packages/tinymce/static/tiny_mce/
|
|
@ -23,13 +23,12 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|||
SECRET_KEY = '_*hrxgzo(8hkrp5f8n4j9vo15acsy0b88yiy$6d5ezwi&pns(j'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ["127.0.0.1", "localhost"]
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
|
@ -42,12 +41,12 @@ INSTALLED_APPS = [
|
|||
]
|
||||
|
||||
MIDDLEWARE_CLASSES = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
# 'django.middleware.security.SecurityMiddleware',
|
||||
# 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
@ -75,7 +74,6 @@ WSGI_APPLICATION = 'tkupek_elearning.wsgi.application'
|
|||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
|
@ -86,7 +84,6 @@ DATABASES = {
|
|||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
|
@ -105,7 +102,6 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.9/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
@ -119,5 +115,6 @@ USE_TZ = True
|
|||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.9/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = '/var/www/tkupek_elearning/elearning/static/'
|
||||
|
||||
|
|
|
@ -26,3 +26,4 @@ urlpatterns = [
|
|||
url(r'statistic', tkupek_elearning.elearning.views.statistic),
|
||||
url(r'^tinymce/', include('tinymce.urls')),
|
||||
]
|
||||
|
||||
|
|
|
@ -19,3 +19,4 @@ sys.path.append(base_parent)
|
|||
os.environ["DJANGO_SETTINGS_MODULE"] = "tkupek_elearning.settings"
|
||||
|
||||
application = get_wsgi_application()
|
||||
|
||||
|
|
Loading…
Reference in a new issue