Claudio
2016-07-05 14:13:44 UTC
Hi all,
I'm trying to execute the script hello.py in this way:
After installing the wsgi_module I've configured Apache in this way:
<VirtualHost *:80>
ServerAdmin ***@mydomain.com
DocumentRoot /var/www/vhosts/csilib
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
WSGIDaemonProcess csilib user=www-data group=www-data processes=1 threads=5
WSGIScriptAlias /app /var/www/vhosts/csilib/app/app.wsgi
<Directory /var/www/vhosts/csilib/app >
WSGIProcessGroup csilib
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory></VirtualHost>
I've added the file /var/www/vhosts/csilib/app/app.wsgi
import os import sys
sys.path.append('/var/www/vhosts/csilib/app') import bottle import hello # Do NOT use bottle.run() with mod_wsgi
application = bottle.default_app()
and I've added the file /var/www/vhosts/csilib/app/hello/hello.py:
from bottle import route @route('/hello') def hello():
return "Hello World!"
In the same hello directory of hello.py I have the file __init__.py.
The problem is that if I call the url: http://127.0.0.1/app/hello I have
the error:
Sorry, the requested URL 'http://127.0.0.1/app/hello' caused an error: Not
found: '/hello'
What's wrong with my code?
Thank you
claudio
--
I'm trying to execute the script hello.py in this way:
After installing the wsgi_module I've configured Apache in this way:
<VirtualHost *:80>
ServerAdmin ***@mydomain.com
DocumentRoot /var/www/vhosts/csilib
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
WSGIDaemonProcess csilib user=www-data group=www-data processes=1 threads=5
WSGIScriptAlias /app /var/www/vhosts/csilib/app/app.wsgi
<Directory /var/www/vhosts/csilib/app >
WSGIProcessGroup csilib
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory></VirtualHost>
I've added the file /var/www/vhosts/csilib/app/app.wsgi
import os import sys
sys.path.append('/var/www/vhosts/csilib/app') import bottle import hello # Do NOT use bottle.run() with mod_wsgi
application = bottle.default_app()
and I've added the file /var/www/vhosts/csilib/app/hello/hello.py:
from bottle import route @route('/hello') def hello():
return "Hello World!"
In the same hello directory of hello.py I have the file __init__.py.
The problem is that if I call the url: http://127.0.0.1/app/hello I have
the error:
Sorry, the requested URL 'http://127.0.0.1/app/hello' caused an error: Not
found: '/hello'
What's wrong with my code?
Thank you
claudio
--
--
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.