Skip to content

Instantly share code, notes, and snippets.

@iamvivekkaushik
Created June 28, 2020 02:49
Show Gist options
  • Select an option

  • Save iamvivekkaushik/44ffb81f3ff43f376e5acae1d9c1b93a to your computer and use it in GitHub Desktop.

Select an option

Save iamvivekkaushik/44ffb81f3ff43f376e5acae1d9c1b93a to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
DEFINE BASE /home/ubuntu/project
DEFINE STATIC /home/ubuntu/project/static
DEFINE MEDIA /home/ubuntu/project/media
DEFINE PROCESS_NAME appname
DEFINE INTERNAL Project_Name
ServerName example.com
ServerAdmin no-reply@example.com
Alias /static ${STATIC}
Alias /media ${MEDIA}
<Directory ${STATIC}>
Require all granted
</Directory>
<Directory ${MEDIA}>
Require all granted
</Directory>
<Directory ${BASE}/${INTERNAL}>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess ${PROCESS_NAME} python-home=${BASE}/.venv python-path=${BASE}
WSGIProcessGroup ${PROCESS_NAME}
WSGIScriptAlias / ${BASE}/${INTERNAL}/wsgi.py
WSGIPassAuthorization On
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment