setup-web2py-ubuntu works on 14.04, thanks Ivan Di Giusto
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Executable → Regular
+15
-45
@@ -1,5 +1,5 @@
|
|||||||
echo "This script will:
|
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/
|
2) install web2py in /home/www-data/
|
||||||
3) create a self signed sll certificate
|
3) create a self signed sll certificate
|
||||||
4) setup web2py with mod_wsgi
|
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 tar
|
||||||
apt-get -y install openssh-server
|
apt-get -y install openssh-server
|
||||||
apt-get -y install build-essential
|
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 ipython
|
||||||
apt-get -y install python-dev
|
apt-get -y install python-dev
|
||||||
apt-get -y install postgresql
|
apt-get -y install postgresql
|
||||||
@@ -70,6 +71,7 @@ a2enmod proxy_http
|
|||||||
a2enmod headers
|
a2enmod headers
|
||||||
a2enmod expires
|
a2enmod expires
|
||||||
a2enmod wsgi
|
a2enmod wsgi
|
||||||
|
a2enmod rewrite # for 14.04
|
||||||
mkdir /etc/apache2/ssl
|
mkdir /etc/apache2/ssl
|
||||||
|
|
||||||
echo "creating a self signed certificate"
|
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 "rewriting your apache config file to use mod_wsgi"
|
||||||
echo "================================================="
|
echo "================================================="
|
||||||
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
|
WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1
|
||||||
|
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
WSGIProcessGroup web2py
|
|
||||||
WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py
|
|
||||||
WSGIPassAuthorization On
|
|
||||||
|
|
||||||
<Directory /home/www-data/web2py>
|
RewriteEngine On
|
||||||
AllowOverride None
|
RewriteCond %{HTTPS} !=on
|
||||||
Order Allow,Deny
|
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
|
||||||
Deny from all
|
|
||||||
<Files wsgihandler.py>
|
|
||||||
Allow from all
|
|
||||||
</Files>
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \
|
|
||||||
/home/www-data/web2py/applications/$1/static/$2
|
|
||||||
<Directory /home/www-data/web2py/applications/*/static/>
|
|
||||||
Options -Indexes
|
|
||||||
Order Allow,Deny
|
|
||||||
Allow from all
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Location /admin>
|
|
||||||
Deny from all
|
|
||||||
</Location>
|
|
||||||
|
|
||||||
<LocationMatch ^/([^/]+)/appadmin>
|
|
||||||
Deny from all
|
|
||||||
</LocationMatch>
|
|
||||||
|
|
||||||
CustomLog /var/log/apache2/access.log common
|
CustomLog /var/log/apache2/access.log common
|
||||||
ErrorLog /var/log/apache2/error.log
|
ErrorLog /var/log/apache2/error.log
|
||||||
@@ -138,10 +107,9 @@ WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1
|
|||||||
|
|
||||||
<Directory /home/www-data/web2py>
|
<Directory /home/www-data/web2py>
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Order Allow,Deny
|
Require all denied
|
||||||
Deny from all
|
|
||||||
<Files wsgihandler.py>
|
<Files wsgihandler.py>
|
||||||
Allow from all
|
Require all granted
|
||||||
</Files>
|
</Files>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
@@ -152,14 +120,16 @@ WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1
|
|||||||
Options -Indexes
|
Options -Indexes
|
||||||
ExpiresActive On
|
ExpiresActive On
|
||||||
ExpiresDefault "access plus 1 hour"
|
ExpiresDefault "access plus 1 hour"
|
||||||
Order Allow,Deny
|
Require all granted
|
||||||
Allow from all
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
CustomLog /var/log/apache2/access.log common
|
CustomLog /var/log/apache2/ssl-access.log common
|
||||||
ErrorLog /var/log/apache2/error.log
|
ErrorLog /var/log/apache2/error.log
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
' > /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 "setting up PAM"
|
||||||
# echo "================"
|
# echo "================"
|
||||||
|
|||||||
Reference in New Issue
Block a user