Paul Hoffman
2014-06-07 16:32:04 UTC
Greetings. I'm following the directions at
http://bottlepy.org/docs/0.12/deployment.html#apache-mod-wsgi assiduously,
but am getting no result, including no errors. I'm running under FreeBSD
10, Apache 2.2 installed from packages, Python 3 installed from packages,
Bottle installed from pip.
In /usr/web/conformance:
# cat adapter.wsgi
# Change working directory so relative paths (and template lookup) work
again
os.chdir(os.path.dirname(__file__))
import bottle
# ... build or import your bottle application here ...
# Do NOT use bottle.run() with mod_wsgi
application = bottle.default_app()
# cat conformance.py
#!/usr/bin/python3
from bottle import route, run, template
print("In conformance")
@route('/hello/<name>')
def index(name):
return template('<b>Hello {{name}}</b>!', name=name)
# run(host='10.20.30.85', port=8090)
Note that when I uncomment the "run", I can run it from the commandline
fine, and accessing 10.20.30.85:8090/hello/me gets the desired result. But
it is commented now.
# cat /usr/local/etc/apache22/Includes/Conformance.conf
<VirtualHost 10.20.30.85:8090>
ServerName 10.20.30.85:8090
WSGIDaemonProcess conformance user=www group=www processes=1 threads=5
home=/tmp
WSGIScriptAlias / /usr/web/conformance/adapter.wsgi
<Directory /usr/web/conformance>
WSGIProcessGroup conformance
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Restarting Apache shows:
Performing sanity check on apache22 configuration:
Syntax OK
Stopping apache22.
Waiting for PIDS: 1650.
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
And the Apache log shows:
[Sat Jun 07 09:29:41 2014] [notice] caught SIGTERM, shutting down
[Sat Jun 07 09:29:42 2014] [warn] Init: Session Cache is not configured
[hint: SSLSessionCache]
[Sat Jun 07 09:29:42 2014] [notice] Digest: generating secret for digest
authentication ...
[Sat Jun 07 09:29:42 2014] [notice] Digest: done
[Sat Jun 07 09:29:43 2014] [notice] Apache/2.2.27 (FreeBSD) mod_wsgi/3.5
Python/2.7.6 mod_ssl/2.2.27 OpenSSL/1.0.1e-freebsd DAV/2 configured --
resuming normal operations
Now when I access 10.20.30.85:8090/hello/me, I get... nothing. The browser
says "unable to connect", and the Apache log shows nothing.
Clues would be greatly appreciated.
--
http://bottlepy.org/docs/0.12/deployment.html#apache-mod-wsgi assiduously,
but am getting no result, including no errors. I'm running under FreeBSD
10, Apache 2.2 installed from packages, Python 3 installed from packages,
Bottle installed from pip.
In /usr/web/conformance:
# cat adapter.wsgi
# Change working directory so relative paths (and template lookup) work
again
os.chdir(os.path.dirname(__file__))
import bottle
# ... build or import your bottle application here ...
# Do NOT use bottle.run() with mod_wsgi
application = bottle.default_app()
# cat conformance.py
#!/usr/bin/python3
from bottle import route, run, template
print("In conformance")
@route('/hello/<name>')
def index(name):
return template('<b>Hello {{name}}</b>!', name=name)
# run(host='10.20.30.85', port=8090)
Note that when I uncomment the "run", I can run it from the commandline
fine, and accessing 10.20.30.85:8090/hello/me gets the desired result. But
it is commented now.
# cat /usr/local/etc/apache22/Includes/Conformance.conf
<VirtualHost 10.20.30.85:8090>
ServerName 10.20.30.85:8090
WSGIDaemonProcess conformance user=www group=www processes=1 threads=5
home=/tmp
WSGIScriptAlias / /usr/web/conformance/adapter.wsgi
<Directory /usr/web/conformance>
WSGIProcessGroup conformance
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Restarting Apache shows:
Performing sanity check on apache22 configuration:
Syntax OK
Stopping apache22.
Waiting for PIDS: 1650.
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
And the Apache log shows:
[Sat Jun 07 09:29:41 2014] [notice] caught SIGTERM, shutting down
[Sat Jun 07 09:29:42 2014] [warn] Init: Session Cache is not configured
[hint: SSLSessionCache]
[Sat Jun 07 09:29:42 2014] [notice] Digest: generating secret for digest
authentication ...
[Sat Jun 07 09:29:42 2014] [notice] Digest: done
[Sat Jun 07 09:29:43 2014] [notice] Apache/2.2.27 (FreeBSD) mod_wsgi/3.5
Python/2.7.6 mod_ssl/2.2.27 OpenSSL/1.0.1e-freebsd DAV/2 configured --
resuming normal operations
Now when I access 10.20.30.85:8090/hello/me, I get... nothing. The browser
says "unable to connect", and the Apache log shows nothing.
Clues would be greatly appreciated.
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.