[solved] Problems with mod_wsgi and apache
I am installing the Django (with mod_wsgi) on Debian 6. I followed the Django installation guide
Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
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:
[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:
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
3 Replies
@kazhy:
…after restarting apache I got
Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerNameerror.
I also receive this in my Apache error logs, and the
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
@zunzun:
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)?
@kazhy:
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