S
smalfish
hi,
i have some question with this,quixote publish width FastCGI.the two
scripts like this(root.ptl and hello.ptl):
class RootDirectory(Directory):
_q_exports = ["", "hello"]
def _q_index
i have some question with this,quixote publish width FastCGI.the two
scripts like this(root.ptl and hello.ptl):
class RootDirectory(Directory):
_q_exports = ["", "hello"]
def _q_index
HTML:
(self):
"""
<h4>Hello,Blog</h4>
<li><a href="hello/">hello</a></li>
"""
hello = HelloDirectory()
class HelloDirectory(Directory):
_q_exports = ["", "hi"]
def _q_index [html] (self):
"""
<h4>hello page</h4>
<li><a href="/">back home</a></li>
"""
def hi [html] (self):
"""
aaaaaaaaaaa
"""
now, on the firefox input:
http://localhost/hello/ --> this ok
http://localhost/hello --> this will forward http://localhost/hello/hello/
, error.
other:
http://localhost/hello/hi --> this ok
http://localhost/hello/hi/ --> http://localhost/hello/hi//hello/hi/
i think,some problem with Nginx(PATH_INFO is not correct.)
==================================
nginx.conf:
location / {
fastcgi_pass 127.0.0.1:8000;
fastcgi_param SERVER_NAME nginx;
fastcgi_param PATH_INFO $request_uri;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors off;
}
fastcgi:
spawn-fcgi -a 127.0.0.1 -p 8000 -f fastcgi_server.py -u nginx -P /var/
log/nginx/qfcgi.pid
thanks!