Skip to content

Instantly share code, notes, and snippets.

@wisaruthk
Last active February 28, 2018 08:04
Show Gist options
  • Save wisaruthk/ec1998d61fb3722baf465640010e09af to your computer and use it in GitHub Desktop.
Save wisaruthk/ec1998d61fb3722baf465640010e09af to your computer and use it in GitHub Desktop.
djangocms apache mod_wsgi configuration with alias
Alias /media/ /usr/local/var/www/mysite/media/
# should run -> python manage.py collectstatic
Alias /static/ /usr/local/var/www/mysite/static/
<Directory /usr/local/var/www/mysite/static>
Require all granted
</Directory>
<Directory /usr/local/var/www/mysite/media>
Require all granted
</Directory>
# Daemon mode
WSGIDaemonProcess mysite.co.th python-path=/usr/local/var/www/mysite:/usr/local/var/www/mysite/env/lib/python3.6/site-packages/
WSGIProcessGroup mysite.co.th
WSGIScriptAlias /mysite.co.th /usr/local/var/www/mysite/mysite/wsgi.py process-group=mysite.co.th
<Directory /usr/local/var/www/mysite/mysite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment