This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2018-07-17 18:57:29 +00:00
|
|
|
# Apache configuration for a Devicehub
|
|
|
|
# It uses plain HTTP
|
|
|
|
# Change the following variables:
|
|
|
|
|
|
|
|
Define servername api.devicetag.io
|
|
|
|
# The domain used to access the server
|
2018-10-29 17:51:11 +00:00
|
|
|
Define appdir /home/devicetag/sites/${servername}/source/
|
2018-07-17 18:57:29 +00:00
|
|
|
# The path where the app directory is. Apache must have access to this folder.
|
|
|
|
Define wsgipath ${appdir}/wsgi.wsgi
|
|
|
|
# The location of the .wsgi file
|
2018-10-29 17:51:11 +00:00
|
|
|
Define pyvenv ${appdir}/venv/
|
2018-09-18 14:05:54 +00:00
|
|
|
# The path where the virtual environment is (the folder containing bin/activate)
|
2018-07-17 18:57:29 +00:00
|
|
|
|
|
|
|
<VirtualHost *:80>
|
|
|
|
ServerName ${servername}
|
|
|
|
|
2018-09-18 14:05:54 +00:00
|
|
|
WSGIDaemonProcess "${servername}" threads=5 lang='en_US.UTF-8' locale='en_US.UTF-8' python-home="${pyvenv}"
|
2018-07-17 18:57:29 +00:00
|
|
|
WSGIScriptAlias / ${wsgipath}
|
|
|
|
|
|
|
|
# pass the required headers through to the application
|
|
|
|
WSGIPassAuthorization On
|
|
|
|
|
|
|
|
<Directory ${appdir}>
|
|
|
|
WSGIProcessGroup "${servername}"
|
|
|
|
WSGIApplicationGroup %{GLOBAL}
|
|
|
|
Require all granted
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
# mod_deflate
|
|
|
|
SetOutputFilter DEFLATE
|
|
|
|
SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png|deb|exe|dmg)$" no-gzip
|
|
|
|
</VirtualHost>
|