From 5dbcda9f38401f936305e757d8b1ec0d769376f3 Mon Sep 17 00:00:00 2001 From: niphlod Date: Thu, 3 Sep 2015 18:08:33 +0200 Subject: [PATCH] fixes #823 --- scripts/setup-web2py-fedora.sh | 3 ++- scripts/setup-web2py-ubuntu.sh | 27 +++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/scripts/setup-web2py-fedora.sh b/scripts/setup-web2py-fedora.sh index 801ce8ea..d7d6d01c 100644 --- a/scripts/setup-web2py-fedora.sh +++ b/scripts/setup-web2py-fedora.sh @@ -1,3 +1,4 @@ +#!/bin/bash echo "This script will: 1) Install modules needed to run web2py on Fedora and CentOS/RHEL 2) Install Python 2.6 to /opt and recompile wsgi if not provided @@ -27,7 +28,7 @@ Press ENTER to continue...[ctrl+C to abort]" read CONFIRM -#!/bin/bash + ### ### Phase 0 - This may get messy. Lets work from a temporary directory diff --git a/scripts/setup-web2py-ubuntu.sh b/scripts/setup-web2py-ubuntu.sh index f9c9f417..8de3050a 100644 --- a/scripts/setup-web2py-ubuntu.sh +++ b/scripts/setup-web2py-ubuntu.sh @@ -1,3 +1,4 @@ +#!/bin/bash echo "This script will: 1) install all modules need to run web2py on Ubuntu 14.04 2) install web2py in /home/www-data/ @@ -12,7 +13,7 @@ Press a key to continue...[ctrl+C to abort]" read CONFIRM -#!/bin/bash + # optional # dpkg-reconfigure console-setup # dpkg-reconfigure timezoneconf @@ -88,9 +89,27 @@ WSGIDaemonProcess web2py user=www-data group=www-data - RewriteEngine On - RewriteCond %{HTTPS} !=on - RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] + WSGIProcessGroup web2py + WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py + WSGIPassAuthorization On + + + AllowOverride None + Require all denied + + Require all granted + + + + AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \ + /home/www-data/web2py/applications/$1/static/$2 + + + Options -Indexes + ExpiresActive On + ExpiresDefault "access plus 1 hour" + Require all granted + CustomLog /var/log/apache2/access.log common ErrorLog /var/log/apache2/error.log