Hi, thanks for your suggestions. You have told me a typo (a2ensite), but
you say you found a few, it will be great if you tell what are those typos.
OTOH, currently I'm using a different apache .conf file, similar to the old
one and to the one you purpose, but not exactly equal.
I don't see the 'coin' word in your AliasMatch files. Also I have added a
WSGIPassAuthorization On directive to allow web2py manage the login
authorization bypassing apache restrictions.
This is the one I'm using, and what I have added to the new package. Your
opinions are welcome:
WSGIRestrictStdout Off
<VirtualHost myserver.name.org:80>
ServerName myserver.name.org
WSGIDaemonProcess web2py user=www-data group=www-data
WSGIProcessGroup web2py
WSGIScriptAlias / /path/to/myweb2py/wsgihandler.py
WSGIPassAuthorization On
<Directory /path/to/myweb2py/web2py>
AllowOverride None
Require all denied
<Files wsgihandler.py>
Require all granted
</Files>
</Directory>
AliasMatch ^/([^/]+)/static/(.*) \
/path/to/myweb2py/applications/$1/static/$2
<Directory /path/to/myweb2py/applications/*/static/>
Options -Indexes
Require all granted
</Directory>
<Location /admin>
Deny from all
</Location>
<LocationMatch ^/([^/]+)/appadmin>
Deny from all
</LocationMatch>
CustomLog /var/log/apache2/web2py-access.log common
ErrorLog /var/log/apache2/web2py-error.log
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost myserver.name.org:443>
ServerName myserver.name.org
WSGIScriptAlias / /path/to/myweb2py/wsgihandler.py
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
<Directory /path/to/myweb2py/web2py>
AllowOverride None
Require all denied
<Files wsgihandler.py>
Require all granted
</Files>
</Directory>
AliasMatch ^/([^/]+)/static/(.*) \
/path/to/myweb2py/applications/$1/static/$2
<Directory /path/to/myweb2py/applications/*/static/>
Options -Indexes
Require all granted
</Directory>
CustomLog /var/log/apache2/secure-web2py-access.log common
ErrorLog /var/log/apache2/secure-web2py-error.log
</VirtualHost>
</IfModule>
2015-02-11 16:34 GMT+01:00 Olivier Berger <
[email protected]>:
> Package: python-web2py
> Version: 1.99.7-1
> Severity: minor
>
> Dear Maintainer,
>
> The provided README.Debian gives instructions on how to adapt the provided
> apache2 conf files but the paths to be used are quite ambiguous.
>
> The "the directory where your web2py application dir is located" is quite
> vague... AFAIU, it corresponds to the provided /usr/share/web2py/
> Also, what does "the directory where web2py applications are installed"
> mean : same as above ?
>
> Maybe, instead, I think it would be far easier (or in addition to these
> instructions) to provide a ready to use .conf file that could work out of
> the box with the provided example apps (should they be kept in
> /usr/share/web2py/applications/ btw ?).
>
> For instance, the following file allows to serve the provided example
> applications, I think... although I'm doubtful about the aliasmatch... :
>
> WSGIRestrictStdout Off
> <VirtualHost *:80>
> ServerName my.server.name.org
>
> WSGIDaemonProcess web2py user=www-data group=www-data
>
> WSGIProcessGroup web2py
> WSGIScriptAlias / /usr/share/web2py/wsgihandler.py
>
> <Directory /usr/share/web2py>
> AllowOverride None
> Order Allow,Deny
> Deny from all
> <Files wsgihandler.py>
> Allow from all
> </Files>
> </Directory>
>
> AliasMatch ^/coin/([^/]+)/static/(.*) \
> /usr/share/web2py/applications/$1/static/$2
> <Directory /usr/share/web2py/applications/*/static/>
> Order Allow,Deny
> Allow from all
> </Directory>
>
>
> <LocationMatch ^/coin/([^/]+)/appadmin>
> Deny from all
> </LocationMatch>
>
> CustomLog /var/log/apache2/web2py-access.log common
> ErrorLog /var/log/apache2/web2py-error.log
> </VirtualHost>
>
>
> <IfModule mod_ssl.c>
> <VirtualHost *:443>
> ServerName my.server.name.org
> WSGIScriptAlias / /usr/share/web2py/wsgihandler.py
>
>
>
> SSLEngine on
> SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
> SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
>
>
> <Directory /usr/share/web2py>
> AllowOverride None
> Order Allow,Deny
> Deny from all
> <Files wsgihandler.py>
> Allow from all
> </Files>
> </Directory>
>
> AliasMatch ^/coin/([^/]+)/static/(.*) \
> /usr/share/web2py/applications/$1/static/$2
> <Directory /usr/share/web2py/applications/*/static/>
> Order Allow,Deny
> Allow from all
> </Directory>
>
> CustomLog /var/log/apache2/secure-web2py-access.log common
> ErrorLog /var/log/apache2/secure-web2py-error.log
>
>
> </VirtualHost>
>
> </IfModule>
>
>
> Also, I noticed a few typos, like a2site which should be a2ensite.
>
> Hope this makes sense.
>
> Thanks in advance.
>
> -- System Information:
> Debian Release: 8.0
> APT prefers testing-updates
> APT policy: (500, 'testing-updates'), (500, 'testing-proposed-updates'),
> (500, 'testing')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
>
> Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
> Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
> Versions of packages python-web2py depends on:
> ii python 2.7.8-3
> ii python-gluon 1.99.7-1
>
> Versions of packages python-web2py recommends:
> ii libjs-jquery 1.7.2+dfsg-3.2
> ii python-gtk2 2.24.0-4
> ii python-tk 2.7.8-2+b1
>
> python-web2py suggests no packages.
>
> -- debconf-show failed
>