-
Notifications
You must be signed in to change notification settings - Fork 2
/
apache_example.conf
49 lines (38 loc) · 2.26 KB
/
apache_example.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Here is a sample, very basic apache configuration. Note that this example uses mod_wsgi and virtual environments.
# It also uses mod_xsendfile. As Bioshare should always be run using SSL, a simple configuration for mod_ssl is at the bottom.
# Set apache to run as bioshare user/group. This achieves a couple things:
# -It keeps owner/group consistent when writing to the filesystem.
# -It allows apache to write to the bioshare authorized_keys file so that users can add their ssh public keys for rsyncing
# The assumption here is that a bioshare user and bioshare group have been created.
User bioshare
Group bioshare
<VirtualHost *:443>
ServerName bioshare.mydomain.edu
ServerAdmin webmaster@bioshare.mydomain.edu
DocumentRoot /virtualenv/bioshare/include/bioshare
ErrorLog /var/log/apache2/bioshare_error_log
CustomLog /var/log/apache2/bioshare_access_log combined
XSendFile On
#you must have one of these for every path you wish to serve data from
XSendFilePath /data/bioshare/
Alias /static/ /virtualenv/bioshare/include/bioshare/static/
WSGIScriptAlias / /virtualenv/bioshare/include/bioshare/bioshareX/wsgi.py
WSGIDaemonProcess bioshare python-path=/virtualenv/bioshare/lib/python2.7/site-packages:/virtualenv/bioshare/include/bioshare:/virtualenv/bioshare/include
WSGIProcessGroup bioshare
<Files wsgi.py>
Require all granted
</Files>
<Directory /virtualenv/bioshare/include/bioshare/static/>
Require all granted
</Directory>
# Very basic example of enabling SSL. Please consult Apache documentation for details on setting up HTTPS.
# Enable/Disable SSL for this virtual host.
SSLEngine on
# A self-signed (snakeoil) certificate can be created by installing
# the ssl-cert package. See
# /usr/share/doc/apache2/README.Debian.gz for more info.
# If both key and certificate are stored in the same file, only the
# SSLCertificateFile directive is needed.
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
</VirtualHost>