Re: How do I know if fastcgi is installed correctly? (using dreamhost)
I'm having the same exact problem. Please keep us posted if you get anywhere. So far I've tried just about every variation I could think of based on Jeff Croft's tutorial, the Django page in the Dreamhost wiki, and the Django docs on FastCGI. I can't even get the FastCGI hello world example to work, so that's what I'm concentrating on now. I opened a ticket with support, so we'll see how that goes. Pretty soon I'll just move to WebFaction or SliceHost, but I have a lot of things up on Dreamhost, so it'd be nice to figure this out. On Jul 19, 6:31 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > On Jul 19, 4:08 pm, FrankW <[EMAIL PROTECTED]> wrote: > > > in your shell, if you cd into /home/walterbyrd/django.niche-software/ > > django > > and type ./dispatch.fcgi, what do you get? > > ./dispatch.fcgi > WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! > WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! > WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! > WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI! > Status: 301 MOVED PERMANENTLY > Content-Type: text/html; charset=utf-8 > Location: / > > > in the dreamhost control panel do you have the domain set up with > > FastCGI support? > > what about Extra Web Security? > > Yes to both. And I went back and double checked. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How do I know if fastcgi is installed correctly? (using dreamhost)
walterbyrd wrote: > > On Jul 19, 4:08 pm, FrankW <[EMAIL PROTECTED]> wrote: >> in your shell, if you cd into /home/walterbyrd/django.niche-software/ >> django >> and type ./dispatch.fcgi, what do you get? >> > > > ./dispatch.fcgi > WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! > WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! > WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! > WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI! > Status: 301 MOVED PERMANENTLY > Content-Type: text/html; charset=utf-8 > Location: / > Could you please also take a quick look into the error.log of your domain right after accessing the test dispatch.fcgi which returned the 500 error? Perhaps there is something wrong with flup itself there :) - Horst --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How do I know if fastcgi is installed correctly? (using dreamhost)
On Jul 19, 4:08 pm, FrankW <[EMAIL PROTECTED]> wrote: > in your shell, if you cd into /home/walterbyrd/django.niche-software/ > django > and type ./dispatch.fcgi, what do you get? > ./dispatch.fcgi WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI! Status: 301 MOVED PERMANENTLY Content-Type: text/html; charset=utf-8 Location: / > in the dreamhost control panel do you have the domain set up with > FastCGI support? > what about Extra Web Security? > Yes to both. And I went back and double checked. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How do I know if fastcgi is installed correctly? (using dreamhost)
in your shell, if you cd into /home/walterbyrd/django.niche-software/ django and type ./dispatch.fcgi, what do you get? in the dreamhost control panel do you have the domain set up with FastCGI support? what about Extra Web Security? On Jul 19, 4:36 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > On Jul 19, 12:24 pm, FrankW <[EMAIL PROTECTED]> wrote: > > > A couple of things to check - what are the permissions on > > dispatch.fcgi? > > It needs to be executable, e.g. -rwxr-xr-x > > Permissions are correct. > > > Also, make sure it does not have DOS mode CR-LF > > No DOS mode CR-LF. > > > And, do you have debug set in your settings.py? > > from settings.py > > DEBUG = True > TEMPLATE_DEBUG = DEBUG > > My file structure: > > django.niche-software.com/ > --- dispatch.fcgi > --- hello.fcgi > --- .htaccess > --- django/ > -- django_media/ > -- django_projects/ > - myproject/ > settings.py > - sqlite-3.4.0 > -- django_src/ > -- django_templates > > The hello.fcgi I got from the dreamhost wiki: > > http://www.skweezer.net/bloglines/s.aspx/2/wiki.dreamhost.com/Special... > > The hello.fcgi looks like this: > > #!/usr/bin/python2.3 > from flup.server.fcgi import WSGIServer > def test_app(environ, start_response): start_response('200 OK', > [('Content-Type', 'text/plain')]) yield 'Hello, world!\n' > WSGIServer(test_app).run() > > I tried running that, and got the same 500 error. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How do I know if fastcgi is installed correctly? (using dreamhost)
On Jul 19, 12:24 pm, FrankW <[EMAIL PROTECTED]> wrote: > A couple of things to check - what are the permissions on > dispatch.fcgi? > It needs to be executable, e.g. -rwxr-xr-x Permissions are correct. > Also, make sure it does not have DOS mode CR-LF No DOS mode CR-LF. > And, do you have debug set in your settings.py? from settings.py DEBUG = True TEMPLATE_DEBUG = DEBUG My file structure: django.niche-software.com/ --- dispatch.fcgi --- hello.fcgi --- .htaccess --- django/ -- django_media/ -- django_projects/ - myproject/ settings.py - sqlite-3.4.0 -- django_src/ -- django_templates The hello.fcgi I got from the dreamhost wiki: http://www.skweezer.net/bloglines/s.aspx/2/wiki.dreamhost.com/Special_~_Search?search=django=Go The hello.fcgi looks like this: #!/usr/bin/python2.3 from flup.server.fcgi import WSGIServer def test_app(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) yield 'Hello, world!\n' WSGIServer(test_app).run() I tried running that, and got the same 500 error. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How do I know if fastcgi is installed correctly? (using dreamhost)
A couple of things to check - what are the permissions on dispatch.fcgi? It needs to be executable, e.g. -rwxr-xr-x Also, make sure it does not have DOS mode CR-LF And, do you have debug set in your settings.py? On Jul 19, 2:04 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > As I said, I tried to follow the tutorial: > > In this directory > > /home/walterbyrd/django.niche-software.com > > I have these two files: > > 1. dispatch.fcgi > sys.path += ['/home/walterbyrd/django.niche-software/django/ > django_src'] > sys.path += ['/home/walterbyrd/django.niche-software/django/ > django_projects'] > > from fcgi import WSGIServer > from django.core.handlers.wsgi import WSGIHandler > import os > > os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' > WSGIServer(WSGIHandler()).run() > > --- > > 2. dispatch.fcgi > #!/usr/bin/env python > > import sys > > sys.path += ['/home/walterbyrd/django.niche-software/django/ > django_src'] > sys.path += ['/home/walterbyrd/django.niche-software/django/ > django_projects'] > > from fcgi import WSGIServer > from django.core.handlers.wsgi import WSGIHandler > import os > > os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' > WSGIServer(WSGIHandler()).run() > [niagara]$ ls -a > . .. .htaccess dispatch.fcgi django fcgi.py fcgi.pyc > [niagara]$ cat .htaccess > RewriteEngine On > RewriteBase / > RewriteRule ^(media/.*)$ - [L] > RewriteRule ^(admin_media/.*)$ - [L] > RewriteRule ^(dispatch\.fcgi/.*)$ - [L] > RewriteRule ^(.*)$ dispatch.fcgi/$1 [L] --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How do I know if fastcgi is installed correctly? (using dreamhost)
As I said, I tried to follow the tutorial: In this directory /home/walterbyrd/django.niche-software.com I have these two files: 1. dispatch.fcgi sys.path += ['/home/walterbyrd/django.niche-software/django/ django_src'] sys.path += ['/home/walterbyrd/django.niche-software/django/ django_projects'] from fcgi import WSGIServer from django.core.handlers.wsgi import WSGIHandler import os os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' WSGIServer(WSGIHandler()).run() --- 2. dispatch.fcgi #!/usr/bin/env python import sys sys.path += ['/home/walterbyrd/django.niche-software/django/ django_src'] sys.path += ['/home/walterbyrd/django.niche-software/django/ django_projects'] from fcgi import WSGIServer from django.core.handlers.wsgi import WSGIHandler import os os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' WSGIServer(WSGIHandler()).run() [niagara]$ ls -a . .. .htaccess dispatch.fcgi django fcgi.py fcgi.pyc [niagara]$ cat .htaccess RewriteEngine On RewriteBase / RewriteRule ^(media/.*)$ - [L] RewriteRule ^(admin_media/.*)$ - [L] RewriteRule ^(dispatch\.fcgi/.*)$ - [L] RewriteRule ^(.*)$ dispatch.fcgi/$1 [L] --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: How do I know if fastcgi is installed correctly? (using dreamhost)
On DreamHost, in ~/mydomain.com I have two files: 1. dispatch.fcgi #!/home/myusername/python/bin/python import os import sys from django.core.servers.fastcgi import runfastcgi sys.path += ['/home/myusername/django'] os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' runfastcgi(['method=threaded', 'daemonize=false']) 2. .htaccess (this is what you use to tell Apache to enable mod_rewrite, note the . before the name) AddHandler fastcgi-script .fcgi RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi/$1 [QSA,L] In my case, I have my Django projects/apps installed under ~/django, and my Virtual Python installation in ~/python. Nathan Ostgard On Jul 18, 9:54 am, walterbyrd <[EMAIL PROTECTED]> wrote: > I am trying to follow jeff croft's tutorial for installing django on > dreamhost. > > http://www2.jeffcroft.com/blog/2006/may/11/django-dreamhost/ > > I am trying to "Install and configure FastCGI" > > I followed the tutorial, I don't see where I did anything wrong. > > One part that I don't quite understand: > > --- > Set up mod_rewrite > Apache's mod_rewrite module will pass all requests to your website > through dispatch.fcgi, and thus, into Django's URL dispatcher. > > > How I am I supposed to do that? Is that done when I do the pkill > python? > > After the pkill python, the tutorial states: > > --- > All URLs on our subdomain should now be routed to Django. Feel free to > open up your browser and try it out for yourself. > --- > > So, I don't have to restart python? Also, what am I supposed to see, > if the setup was successful? I gave it a try and the server timed out. > Any idea what I did wrong? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
How do I know if fastcgi is installed correctly? (using dreamhost)
I am trying to follow jeff croft's tutorial for installing django on dreamhost. http://www2.jeffcroft.com/blog/2006/may/11/django-dreamhost/ I am trying to "Install and configure FastCGI" I followed the tutorial, I don't see where I did anything wrong. One part that I don't quite understand: --- Set up mod_rewrite Apache's mod_rewrite module will pass all requests to your website through dispatch.fcgi, and thus, into Django's URL dispatcher. How I am I supposed to do that? Is that done when I do the pkill python? After the pkill python, the tutorial states: --- All URLs on our subdomain should now be routed to Django. Feel free to open up your browser and try it out for yourself. --- So, I don't have to restart python? Also, what am I supposed to see, if the setup was successful? I gave it a try and the server timed out. Any idea what I did wrong? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---