c2d9a373c1
The current wsgi does not support virtualenvs (in some distributions, the dependencies may conflict with the distribution's python packages/dependencies and would require a virtualenv even in production). Also, making an apache web configuration is not always trivial especialy with ssl. This "make_web_conf" command creates a wsgi with automatic virtualenvironment detection (if there is a virtualenvironment), and creates an apache (normal or ssl) configuration TODO(ygbo):: - add nginx support to generate nginx configuration files. - add gunicorn support. - add uwsgi support. implements bp web-conf-generation-script Change-Id: I6397ba01df88b540bbdca4bf21ba90be6843022a
38 lines
1.0 KiB
Plaintext
38 lines
1.0 KiB
Plaintext
{% if SSL %}
|
|
# Set "NameVirtualHost {{ NAMEDHOST }}:443" in your httpd.conf file if it's not already done.
|
|
<VirtualHost {{ NAMEDHOST }}:443>
|
|
SSLEngine on
|
|
SSLCertificateFile {{ SSLCERT }}
|
|
SSLCertificateKeyFile {{ SSLKEY }}
|
|
{% if CACERT %} SSLCACertificateFile {{ CACERT }}{% endif %}
|
|
{% else %}
|
|
<VirtualHost {{ NAMEDHOST }}:80>
|
|
{% endif %}
|
|
ServerAdmin {{ ADMIN }}
|
|
ServerName {{ VHOSTNAME }}
|
|
|
|
DocumentRoot {{ PROJECT_ROOT }}/
|
|
|
|
LogLevel warn
|
|
ErrorLog {{ LOGDIR }}/{{ PROJECT_NAME }}-error.log
|
|
CustomLog {{ LOGDIR }}/{{ PROJECT_NAME }}-access.log combined
|
|
|
|
WSGIScriptReloading On
|
|
WSGIDaemonProcess {{ PROJECT_NAME }}_website
|
|
WSGIProcessGroup {{ PROJECT_NAME }}_website
|
|
WSGIApplicationGroup {{ PROJECT_NAME }}_website
|
|
WSGIPassAuthorization On
|
|
|
|
WSGIScriptAlias / {{ WSGI_FILE }}
|
|
|
|
<Location "/">
|
|
Order Allow,Deny
|
|
Allow from all
|
|
</Location>
|
|
|
|
Alias /static {{ STATIC_PATH }}
|
|
<Location "/static">
|
|
SetHandler None
|
|
</Location>
|
|
</Virtualhost>
|