summaryrefslogtreecommitdiff
path: root/apache2
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2013-06-26 20:58:58 +0200
committerJonas Smedegaard <dr@jones.dk>2013-06-26 20:58:58 +0200
commitccb4b2243104b483995bf2c234ec78de39895d5c (patch)
tree3a6b44a0051042627ab6a6bf6bcbca5f4a125220 /apache2
parentfa7b271bae2d1d3beb65cd6ddb9c0e8e20c54cbc (diff)
Add Apache and uWSGI example configs for PHP app.
Diffstat (limited to 'apache2')
-rw-r--r--apache2/sites-available/php.example.com26
1 files changed, 26 insertions, 0 deletions
diff --git a/apache2/sites-available/php.example.com b/apache2/sites-available/php.example.com
new file mode 100644
index 0000000..259d5f1
--- /dev/null
+++ b/apache2/sites-available/php.example.com
@@ -0,0 +1,26 @@
+<VirtualHost *:80>
+ ServerName php.example.com
+ ServerAdmin webmaster@example.com
+ DocumentRoot /var/www-php-app/foo
+
+ <Location />
+ DirectoryIndex index.php
+ SetHandler uwsgi-handler
+ uWSGISocket /run/uwsgi/app/local-php-app/socket
+ uWSGImodifier1 9
+ </Location>
+
+ ErrorLog ${APACHE_LOG_DIR}/www.example.com-error.log
+ CustomLog ${APACHE_LOG_DIR}/www.example.com-access.log combined
+</VirtualHost>
+<VirtualHost *:80>
+ ServerName www.php.example.com
+ ServerAlias *.php.example.com
+
+ Include conf.d/local-log-origin.conf
+
+ RedirectMatch permanent .* http://php.example.com/
+
+ ErrorLog ${APACHE_LOG_DIR}/django.example.com-error.log
+ CustomLog ${APACHE_LOG_DIR}/django.example.com-access.log origin
+</VirtualHost>