I got a problem with my Django+fcgi+Nginx setup on VMware virtual machine with “ubuntu server 11.04”
my #urls.py from django.conf.urls.defaults import patterns, include, url from sitename.views import hello, my_homepage_view urlpatterns = patterns('', (r'^$', my_homepage_view), (r'^hello/$', hello), ) #views.py from django.http import HttpResponse import datetime def my_homepage_view(request): now = datetime.datetime.now() html="<html><body>It is now %s. Yep, ... This is my homepage. </ body></html>" % now return HttpResponse(html) def hello(request): return HttpResponse("<html><body>Hello World!</body></html>") ----------------------------------------------------------------------------------- when I run testserver ./manage.py runserver 192.168.169.155:8000 where 192.168.169.155 – is an adress of my virtual machine (when use localhost same thing happens) when I open http://192.168.169.155:8000/ my “my_homepage_view” opens and http://192.168.169.155:8000/hello/ my “hello” page opens but if I start fcgi ./manage.py runfcgi protocol=fcgi method=prefork daemonize=false host=127.0.0.1 port=8881 and my nginx server configs looks like #nginx.conf server { listen 80; server_name servername; charset utf-8; access_log logs/access.log ; client_max_body_size 300m; location / { fastcgi_pass 127.0.0.1:8881; include fastcgi_params; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } # fastcgi_params fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; fastcgi_param REDIRECT_STATUS 200; ----------------------------------------------------------------------------------------------------------------------------------- when I open http://192.168.169.155/ my “my_homepage_view” opens and http://192.168.169.155/hello/ my “my_homepage_view” opens again. I presume somewhere in my fcgi settings something redirects all requests to site root help me find it please thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.