On Jul 15, 2010, at 7:59 AM, ashy wrote:
> Hi All,
>
> I am having problems configuring mod_wsgi
>
> The contents of my sites-available/default
>
> <VirtualHost *:80>
> ServerName testdev.com
> ServerAdmin webmas...@localhost
>
> DocumentRoot /var/www
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> </Directory>
> <Directory /var/www/>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride None
> Order allow,deny
> allow from all
> </Directory>
>
> WSGIScriptAlias / /home/bzala/djangoprojects/testdev/apache/
> django.wsgi
>
> <Directory /home/bzala/djangoprojects/testdev>
> Order deny,allow
> Allow from all
> </Directory>
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <Directory "/usr/lib/cgi-bin">
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>
>
> ErrorLog /var/log/apache2/error.log
> #ErrorLog /home/bzala/error.log
>
> # Possible values include: debug, info, notice, warn, error,
> crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog /var/log/apache2/access.log combined
>
> Alias /doc/ "/usr/share/doc/"
> <Directory "/usr/share/doc/">
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> </Directory>
>
> </VirtualHost>
>
> The contents of the wsgi file
>
> import os, sys
> sys.path.append('/home/bzala/djangoprojects')
> sys.path.append('/home/bzala/djangoprojects/testdev')
> os.environ['DJANGO_SETTINGS_MODULE'] = 'testdev.settings'
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> The error that appears when trying to restart the apache server
>
> (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
> no listening sockets available, shutting down
> Unable to open logs
>
> Can anybody help me debugging this.
You're not getting to mod_wsgi; you're having trouble configuring Apache ;-).
Are you starting Apache with sudo? If not, you won't get out of the gate.
If it's not sudo, are you accidentally running another webserver (like another
apache instance or nginx) that's binding all the servable addresses?
What happens if you go to http://ip.add.re.ss using your ip address? Is there
a default page there?
Also, as an aside, putting all your configuration into the default kind of
misses the whole point of that fancy directory structure. It's set up that
way to let you enable and disable sites easily (a2dissite a2ensite on ubuntu),
you should probably use it that way. It'll also help you narrow down the
actual problem.
S
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.