From ccb4b2243104b483995bf2c234ec78de39895d5c Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 26 Jun 2013 20:58:58 +0200 Subject: Add Apache and uWSGI example configs for PHP app. --- apache2/sites-available/php.example.com | 26 ++++++++++++++++++++++++++ uwsgi/apps-available/local-php-app.ini | 21 +++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 apache2/sites-available/php.example.com create mode 100644 uwsgi/apps-available/local-php-app.ini 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 @@ + + ServerName php.example.com + ServerAdmin webmaster@example.com + DocumentRoot /var/www-php-app/foo + + + DirectoryIndex index.php + SetHandler uwsgi-handler + uWSGISocket /run/uwsgi/app/local-php-app/socket + uWSGImodifier1 9 + + + ErrorLog ${APACHE_LOG_DIR}/www.example.com-error.log + CustomLog ${APACHE_LOG_DIR}/www.example.com-access.log combined + + + 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 + diff --git a/uwsgi/apps-available/local-php-app.ini b/uwsgi/apps-available/local-php-app.ini new file mode 100644 index 0000000..0cc3675 --- /dev/null +++ b/uwsgi/apps-available/local-php-app.ini @@ -0,0 +1,21 @@ +[uwsgi] +plugins = cgi + +uid = www-php-app + +master = true +processes = 8 +cheaper = 2 + +docroot = /home/www-php-app/foo + +check-static = %(docroot) +static-skip-ext = .sh +static-skip-ext = .php +static-skip-ext = .inc +static-index = index.php + +cgi = /=%(docroot)/index.php +cgi-allowed-ext = .php +cgi-helper = .php=php-cgi +cgi-index = index.php -- cgit v1.2.3