Hi Armando,

To specify the Postgre password, you should set the environment variable
pointing to the pgpass file ...... basically add this line to your wsgi
script (replacing with the actual location of your pgpass file of course)

*os.environ['PGPASSFILE']='/home/ap2/.pgpass'*

Let me know if it works.

Regards,
Anurag

On Sat, Dec 18, 2010 at 3:20 AM, armandoperico <armandoper...@hotmail.com>wrote:

> sorry,
> how should do to specify the password on the wsgi file ?
> this would be the best i have so far.
>
> thanks
>
>
> On Dec 17, 10:17 pm, Anurag Chourasia <anurag.choura...@gmail.com>
> wrote:
> > And did you had to provide a password for establishing that connection?
> Or
> > the .pgpass file took care of it?
> >
> > If you had to provide a password then probably that's your clue. You
> might
> > be required to specify the pgpass in mod wsgi script.
> >
> > On Sat, Dec 18, 2010 at 2:45 AM, armandoperico <
> armandoper...@hotmail.com>wrote:
> >
> >
> >
> >
> >
> >
> >
> > > yes.
> >
> > > On Dec 17, 10:04 pm, Anurag Chourasia <anurag.choura...@gmail.com>
> > > wrote:
> > > >  On this server, are you able to connect to the PostGre database
> using
> > > the
> > > > command line?
> >
> > > > psql -U myuser -h 127.0.0.1 -p 5432 -d dbname
> >
> > > > Regards,
> > > > Anurag
> >
> > > > On Sat, Dec 18, 2010 at 2:19 AM, armandoperico <
> > > armandoper...@hotmail.com>wrote:
> >
> > > > > on settings.py..
> >
> > > > > DATABASES = {
> > > > >    'default': {
> > > > >        'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add
> > > > > 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or
> 'oracle'.
> > > > >        'NAME': 'dbname',                      # Or path to database
> > > > > file if using sqlite3.
> > > > >        'USER': 'myuser',                      # Not used with
> > > > > sqlite3.
> > > > >        'PASSWORD': 'mypass',                  # Not used with
> > > > > sqlite3.
> > > > >        'HOST': '127.0.0.1',                      # Set to empty
> > > > > string for localhost. Not used with sqlite3.
> > > > >        'PORT': '5432',                      # Set to empty string
> for
> > > > > default. Not used with sqlite3.
> > > > >     }
> > > > > }
> >
> > > > > On Dec 17, 9:25 pm, Christophe Pettus <x...@thebuild.com> wrote:
> > > > > > On Dec 17, 2010, at 12:02 PM, armandoperico wrote:
> >
> > > > > > > On my local machine everything is running fine, but when i try
> to
> > > > > > > deploy to a running server with apache (mod_wsgi), i'm getting
> the
> > > > > > > following error (database related):
> >
> > > > > > > Caught OperationalError while rendering: could not connect to
> > > server:
> > > > > > > Permission denied
> > > > > > >    Is the server running on host "127.0.0.1" and accepting
> > > > > > >    TCP/IP connections on port 5432?
> >
> > > > > > What's your database configuration on the Apache machine?
> >
> > > > > > --
> > > > > > -- Christophe Pettus
> > > > > >    x...@thebuild.com
> >
> > > > > --
> > > > > 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<django-users%2bunsubscr...@googlegroups.com>
> <django-users%2bunsubscr...@google groups.com>
> > > <django-users%2bunsubscr...@google groups.com>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/django-users?hl=en.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Django users" group.
> > > To post to this group, send email to django-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> <django-users%2bunsubscr...@google groups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to