 |
Linode Forum Linode Community Forums
|
| Author |
Message |
kazhy
Joined: 17 Feb 2011
Posts: 2
|
| Posted: Thu Feb 17, 2011 5:42 am Post subject: [solved] Problems with mod_wsgi and apache |
|
|
Hi!
I am installing the Django (with mod_wsgi) on Debian 6. I followed the Django installation guide, but after restarting apache I got Code: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName error.
When I try the address (lets say, foo.lv) in browser - i get error 500 (internal server error), but the last messages in apache error log are like this:
Code:
[Thu Feb 17 10:33:05 2011] [notice] caught SIGTERM, shutting down
[Thu Feb 17 10:33:06 2011] [notice] Apache/2.2.16 (Debian) mod_wsgi/3.3 Python/2.6.6 configured -- resuming normal operations
The file in /etc/apache2/sites-available/foo.lv looks exactly like the one in tutorial (with the correct folders).
My /etc/hosts looks like this:
Code: 127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Do I need to add some extra lines to /etc/hosts? If so, what is the right syntax? Or something else is wrong here?
Thanks in advance!
UPDATE: I did a VM rebuild, started all from scratch (carefully reading the docs) and now it works :) |
|
| Back to top |
|
zunzun
Joined: 18 Feb 2005
Posts: 445
Location: Birmingham, Alabama USA
|
| Posted: Thu Feb 17, 2011 5:52 am Post subject: Re: Problems with mod_wsgi and apache |
|
|
kazhy wrote: ...after restarting apache I got Code: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName error.
I also receive this in my Apache error logs, and the http://zunzun.com/ Django site runs fine - so this might not be the problem.
On the linode, try the address 127.0.0.1 in a browser and see if you receive additional Django error detail. If you do not run a GUI remotely on your Linode, try using the lynx text browser. On my linode, both graphical and non-graphical browsers return a web page. Normally any Django errors give additional detail when the web pages are run from the server itself.
James |
|
| Back to top |
|
kazhy
Joined: 17 Feb 2011
Posts: 2
|
| Posted: Thu Feb 17, 2011 6:29 am Post subject: Re: Problems with mod_wsgi and apache |
|
|
zunzun wrote:
I also receive this in my Apache error logs, and the http://zunzun.com/ Django site runs fine - so this might not be the problem.
On the linode, try the address 127.0.0.1 in a browser and see if you receive additional Django error detail. If you do not run a GUI remotely on your Linode, try using the lynx text browser. On my linode, both graphical and non-graphical browsers return a web page. Normally any Django errors give additional detail when the web pages are run from the server itself.
James
When I try to run lynx on localhost, it shows the index.html in apache`s document root, not django index page. i tried running it with dev server and the django works fine.
What do you have in your /etc/hosts file (for running your django page)? |
|
| Back to top |
|
zunzun
Joined: 18 Feb 2005
Posts: 445
Location: Birmingham, Alabama USA
|
| Posted: Thu Feb 17, 2011 10:55 am Post subject: Re: Problems with mod_wsgi and apache |
|
|
kazhy wrote: What do you have in your /etc/hosts file (for running your django page)?
Here you go. I do have virtual hosts set up in apache, though.
zunzun@none:~$ cat /etc/hosts
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts |
|
| Back to top |
|
| |
|