summaryrefslogtreecommitdiff
path: root/apache2/sites-available
diff options
context:
space:
mode:
authorroot <root@localhost>2013-06-26 20:45:35 +0200
committerroot <root@localhost>2013-06-26 20:45:47 +0200
commitfa7b271bae2d1d3beb65cd6ddb9c0e8e20c54cbc (patch)
tree59e3b83913c0712532140f12caabff7b8778166b /apache2/sites-available
parent1199fa5bf6fee2d97331c2223df56e1d94a6a625 (diff)
Add Apache and uWSGI example configs for Django and RT4 apps.
Diffstat (limited to 'apache2/sites-available')
-rw-r--r--apache2/sites-available/django.secure-example.com27
-rw-r--r--apache2/sites-available/issues.secure-example.com26
2 files changed, 53 insertions, 0 deletions
diff --git a/apache2/sites-available/django.secure-example.com b/apache2/sites-available/django.secure-example.com
new file mode 100644
index 0000000..5424420
--- /dev/null
+++ b/apache2/sites-available/django.secure-example.com
@@ -0,0 +1,27 @@
+<VirtualHost *:443>
+ ServerName django.example.com
+ ServerAdmin webmaster@example.com
+ DocumentRoot /var/www/nowhere
+
+ Include conf.d/local-ssl.conf
+
+ <Location />
+ SetHandler uwsgi-handler
+ uWSGISocket /run/uwsgi/app/local-django-app/socket
+ uWSGImaxVars 512
+ </Location>
+
+ ErrorLog ${APACHE_LOG_DIR}/django.example.com-error.log
+ CustomLog ${APACHE_LOG_DIR}/django.example.com-access.log combined
+</VirtualHost>
+<VirtualHost *:80>
+ ServerName django.example.com
+ ServerAlias *.django.example.com
+
+ Include conf.d/local-log-origin.conf
+
+ RedirectMatch permanent .* https://django.example.com/
+
+ ErrorLog ${APACHE_LOG_DIR}/django.example.com-error.log
+ CustomLog ${APACHE_LOG_DIR}/django.example.com-access.log origin
+</VirtualHost>
diff --git a/apache2/sites-available/issues.secure-example.com b/apache2/sites-available/issues.secure-example.com
new file mode 100644
index 0000000..1ba61f0
--- /dev/null
+++ b/apache2/sites-available/issues.secure-example.com
@@ -0,0 +1,26 @@
+<VirtualHost *:443>
+ ServerName issues.example.com
+ ServerAdmin webmaster@example.com
+ DocumentRoot /var/www/nowhere
+
+ Include conf.d/local-ssl.conf
+
+ <Location />
+ SetHandler uwsgi-handler
+ uWSGISocket /run/uwsgi/app/local-rt4/socket
+ </Location>
+
+ ErrorLog ${APACHE_LOG_DIR}/issues.example.com-error.log
+ CustomLog ${APACHE_LOG_DIR}/issues.example.com-access.log combined
+</VirtualHost>
+<VirtualHost *:80>
+ ServerName issues.example.com
+ ServerAlias *.issues.example.com
+
+ Include conf.d/local-log-origin.conf
+
+ RedirectMatch permanent .* https://issues.example.com/
+
+ ErrorLog ${APACHE_LOG_DIR}/issues.example.com-error.log
+ CustomLog ${APACHE_LOG_DIR}/issues.example.com-access.log origin
+</VirtualHost>