From a0d7470cf3b87fa8dd1e9f5d5e0e7ab4e83d11be Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 16 Aug 2014 23:21:19 -0500 Subject: [PATCH] setup-web2py-ubuntu works on 14.04, thanks Ivan Di Giusto --- VERSION | 2 +- scripts/setup-web2py-ubuntu.sh | 60 +++++++++------------------------- 2 files changed, 16 insertions(+), 46 deletions(-) mode change 100755 => 100644 scripts/setup-web2py-ubuntu.sh diff --git a/VERSION b/VERSION index 1647a66f..890752ce 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.10.0-trunk+timestamp.2014.08.14.21.40.41 +Version 2.10.0-trunk+timestamp.2014.08.16.23.20.56 diff --git a/scripts/setup-web2py-ubuntu.sh b/scripts/setup-web2py-ubuntu.sh old mode 100755 new mode 100644 index 0de6a122..4ce86474 --- a/scripts/setup-web2py-ubuntu.sh +++ b/scripts/setup-web2py-ubuntu.sh @@ -1,5 +1,5 @@ echo "This script will: -1) install all modules need to run web2py on Ubuntu/Debian +1) install all modules need to run web2py on Ubuntu 14.04 2) install web2py in /home/www-data/ 3) create a self signed sll certificate 4) setup web2py with mod_wsgi @@ -30,7 +30,8 @@ apt-get -y install zip unzip apt-get -y install tar apt-get -y install openssh-server apt-get -y install build-essential -apt-get -y install python2.5 +apt-get -y install python +#apt-get -y install python2.5 apt-get -y install ipython apt-get -y install python-dev apt-get -y install postgresql @@ -70,6 +71,7 @@ a2enmod proxy_http a2enmod headers a2enmod expires a2enmod wsgi +a2enmod rewrite # for 14.04 mkdir /etc/apache2/ssl echo "creating a self signed certificate" @@ -82,46 +84,13 @@ openssl x509 -noout -fingerprint -text < /etc/apache2/ssl/self_signed.cert > /et echo "rewriting your apache config file to use mod_wsgi" echo "=================================================" echo ' -NameVirtualHost *:80 -NameVirtualHost *:443 -# If the WSGIDaemonProcess directive is specified outside of all virtual -# host containers, any WSGI application can be delegated to be run within -# that daemon process group. -# If the WSGIDaemonProcess directive is specified -# within a virtual host container, only WSGI applications associated with -# virtual hosts with the same server name as that virtual host can be -# delegated to that set of daemon processes. WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1 - WSGIProcessGroup web2py - WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py - WSGIPassAuthorization On - - AllowOverride None - Order Allow,Deny - Deny from all - - Allow from all - - - - AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \ - /home/www-data/web2py/applications/$1/static/$2 - - Options -Indexes - Order Allow,Deny - Allow from all - - - - Deny from all - - - - Deny from all - + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] CustomLog /var/log/apache2/access.log common ErrorLog /var/log/apache2/error.log @@ -138,10 +107,9 @@ WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1 AllowOverride None - Order Allow,Deny - Deny from all + Require all denied - Allow from all + Require all granted @@ -152,14 +120,16 @@ WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1 Options -Indexes ExpiresActive On ExpiresDefault "access plus 1 hour" - Order Allow,Deny - Allow from all + Require all granted - CustomLog /var/log/apache2/access.log common + CustomLog /var/log/apache2/ssl-access.log common ErrorLog /var/log/apache2/error.log -' > /etc/apache2/sites-available/default +' > /etc/apache2/sites-available/default.conf # FOR 14.04 + +sudo rm /etc/apache2/sites-enabled/* # FOR 14.04 +sudo a2ensite default # FOR 14.04 # echo "setting up PAM" # echo "================"