Setting up Django with fastCGI on centos with apache

2011-07-15 Thread Rick Beacham
I'm having alot of trouble with setting up django with fastCGI. I was
able to use the default test server made with django no problem.  But
I'm having trouble setting it up with httpd and fastCGI in scientific
linux(centos)..   Here is the error message after running this
command  ./manage.py runfcgi daemonize=false host=127.0.0.1
port=8000  .





Traceback (most recent call last):
  File "./manage.py", line 14, in 
execute_manager(settings)
  File "/opt/python2.7/lib/python2.7/site-packages/django/core/
management/__init__.py", line 438, in execute_manager
utility.execute()
  File "/opt/python2.7/lib/python2.7/site-packages/django/core/
management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/python2.7/lib/python2.7/site-packages/django/core/
management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
  File "/opt/python2.7/lib/python2.7/site-packages/django/core/
management/base.py", line 220, in execute
output = self.handle(*args, **options)
  File "/opt/python2.7/lib/python2.7/site-packages/django/core/
management/commands/runfcgi.py", line 16, in handle
runfastcgi(args)
  File "/opt/python2.7/lib/python2.7/site-packages/django/core/servers/
fastcgi.py", line 180, in runfastcgi
WSGIServer(WSGIHandler(), **wsgi_opts).run()
  File "build/bdist.linux-x86_64/egg/flup/server/fcgi_fork.py", line
131, in run
  File "build/bdist.linux-x86_64/egg/flup/server/fcgi_base.py", line
1018, in _setupSocket
  File "/opt/python2.7/lib/python2.7/socket.py", line 222, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

-- 
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.



Re: Setting up Django with fastCGI on centos with apache

2011-07-19 Thread Rick Beacham
thanks for the info.  I corrected the this but i'm still having issues.


On Fri, Jul 15, 2011 at 2:35 PM, ionic drive  wrote:

> Hello Rick,
>
> Address already in use, tells you that on 127.0.0.1 specific port 8000
> already a process is running. I guess you have your Apache already
> running their, right!?
>
> you have to listen with your Apache to the proper port where fastcgi is
> serving the data for Apache. I think you have to re-read the tutorial
> you are working on.
>
> Good luck!
> Ionic
> Electronics Platform
> http://develissimo.com
>
>
> On Fri, 2011-07-15 at 12:06 -0700, Rick Beacham wrote:
> > I'm having alot of trouble with setting up django with fastCGI. I was
> > able to use the default test server made with django no problem.  But
> > I'm having trouble setting it up with httpd and fastCGI in scientific
> > linux(centos)..   Here is the error message after running this
> > command  ./manage.py runfcgi daemonize=false host=127.0.0.1
> > port=8000  .
> >
> >
> >
> >
> >
> > Traceback (most recent call last):
> >   File "./manage.py", line 14, in 
> > execute_manager(settings)
> >   File "/opt/python2.7/lib/python2.7/site-packages/django/core/
> > management/__init__.py", line 438, in execute_manager
> > utility.execute()
> >   File "/opt/python2.7/lib/python2.7/site-packages/django/core/
> > management/__init__.py", line 379, in execute
> > self.fetch_command(subcommand).run_from_argv(self.argv)
> >   File "/opt/python2.7/lib/python2.7/site-packages/django/core/
> > management/base.py", line 191, in run_from_argv
> > self.execute(*args, **options.__dict__)
> >   File "/opt/python2.7/lib/python2.7/site-packages/django/core/
> > management/base.py", line 220, in execute
> > output = self.handle(*args, **options)
> >   File "/opt/python2.7/lib/python2.7/site-packages/django/core/
> > management/commands/runfcgi.py", line 16, in handle
> > runfastcgi(args)
> >   File "/opt/python2.7/lib/python2.7/site-packages/django/core/servers/
> > fastcgi.py", line 180, in runfastcgi
> > WSGIServer(WSGIHandler(), **wsgi_opts).run()
> >   File "build/bdist.linux-x86_64/egg/flup/server/fcgi_fork.py", line
> > 131, in run
> >   File "build/bdist.linux-x86_64/egg/flup/server/fcgi_base.py", line
> > 1018, in _setupSocket
> >   File "/opt/python2.7/lib/python2.7/socket.py", line 222, in meth
> > return getattr(self._sock,name)(*args)
> > socket.error: [Errno 98] Address already in use
> >
>
>
> --
> 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.
>
>


-- 
Green dreams sleep roughly.

-- 
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.



Re: Setting up Django with fastCGI on centos with apache

2011-07-19 Thread Rick Beacham
here is my problem..

After trying to run on localhost/hello/ through lynx I get a 500. This
is what htttpd error_log file prints out.

I am not using socks, i am using tcp host port 3303.

[Tue Jul 19 13:23:16 2011] [error] [client 127.0.0.1] (13)Permission
denied: FastCGI: failed to connect to server "/var/www/html/
mysite.fcgi": connect() failed
[Tue Jul 19 13:23:16 2011] [error] [client 127.0.0.1] FastCGI:
incomplete headers (0 bytes) received from server "/var/www/html/
mysite.fcgi"

I'm not sure if its a permission problem or SELinux issue.

fcgi is working by itself without apache look at it here.

FCGI TestApp

FCGI TestApprequest count = 1pid =
25838CVS_RSH  :  ssh
DISPLAY  :  localhost:12.0
G_BROKEN_FILENAMES   :  1
HISTSIZE :  1000
HOME :  /root
HOSTNAME :  
INPUTRC  :  /etc/inputrc
KDEDIR   :  /usr
KDE_IS_PRELINKED :  1
KDE_NO_IPV6  :  1
LANG :  en_US.UTF-8
LESSOPEN :  |/usr/bin/lesspipe.sh %s
LOGNAME  :  root
LS_COLORS:
no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
MAIL :  /var/spool/mail/root
OLDPWD   :  /root
PATH :  /usr/kerberos/sbin:/usr/kerberos/bin:/
usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
PWD  :  /var/www/html
SHELL:  /bin/bash
SHLVL:  1
SSH_ASKPASS  :  /usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT   :  192.208.139.76 3756 22
SSH_CONNECTION   :  
SSH_TTY  :  /dev/pts/3
TERM :  vt100
USER :  root
_:  /usr/local/bin/python





Cheers mate.

On Jul 19, 11:19 am, Tom Evans  wrote:
> On Tue, Jul 19, 2011 at 5:05 PM, Rick Beacham  wrote:
> > thanks for the info.  I corrected the this but i'm still having issues.
>
> My crystal ball is out of order, could you specify the issues please.
>
> Cheers
>
> Tom

-- 
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.



Scientific Linux with django running through apache and fastcgi

2011-07-19 Thread Rick Beacham
here is my problem..

After trying to run on localhost/hello/ through lynx I get a 500. This
is what htttpd error_log file prints out.

I am not using socks, i am using tcp host port 3303.

[Tue Jul 19 13:23:16 2011] [error] [client 127.0.0.1] (13)Permission
denied: FastCGI: failed to connect to server "/var/www/html/
mysite.fcgi": connect() failed
[Tue Jul 19 13:23:16 2011] [error] [client 127.0.0.1] FastCGI:
incomplete headers (0 bytes) received from server "/var/www/html/
mysite.fcgi"

I'm not sure if its a permission problem or SELinux issue.

fcgi is working by itself without apache look at it here.

FCGI TestApp

FCGI TestApprequest count = 1pid =
25838CVS_RSH  :  ssh
DISPLAY  :  localhost:12.0
G_BROKEN_FILENAMES   :  1
HISTSIZE :  1000
HOME :  /root
HOSTNAME :  
INPUTRC  :  /etc/inputrc
KDEDIR   :  /usr
KDE_IS_PRELINKED :  1
KDE_NO_IPV6  :  1
LANG :  en_US.UTF-8
LESSOPEN :  |/usr/bin/lesspipe.sh %s
LOGNAME  :  root
LS_COLORS:
no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
MAIL :  /var/spool/mail/root
OLDPWD   :  /root
PATH :  /usr/kerberos/sbin:/usr/kerberos/bin:/
usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
PWD  :  /var/www/html
SHELL:  /bin/bash
SHLVL:  1
SSH_ASKPASS  :  /usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT   :  192.208.139.76 3756 22
SSH_CONNECTION   :  
SSH_TTY  :  /dev/pts/3
TERM :  vt100
USER :  root
_:  /usr/local/bin/python





Cheers

-- 
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.



Running Django on a Shared-Hosting Provider with Apache

2011-07-20 Thread Rick Beacham
Running Django on a Shared-Hosting Provider with Apache

When i go to run the mysite.fcgi it prints out itself in the
browser..Is there something wrong here?  I have followed the steps
to the tee..

http://localhost/mysite.fcgi
print out this:
import sys, os

# Add a custom Python path.
sys.path.insert(0, "/usr/bin/python2.7")

# Switch to the directory of your project. (Optional.)
# os.chdir("/home/user/myproject")

# Set the DJANGO_SETTINGS_MODULE environment variable.
os.environ['DJANGO_SETTINGS_MODULE'] = "myproject.settings"

from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="true")

here is my .htaccess file

Handler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ django.fcgi/$1 [QSA,L]

is it a permission problem?



-- 
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.