Apache + mod_wsgi deploy problem

19 views
Skip to first unread message

Renato Beserra

unread,
May 10, 2011, 7:39:15 AM5/10/11
to django...@googlegroups.com
Hi,

I think I have a really basic problem but I didn't find a solution searching the web.

I have a Django application running on my local apache, and I can access everything locally whitout any problems. But when i try to access it from an external host, the server timeout.I guess it has something to do with apache permissions, but my httpd.conf file looks similar to the examples i found online. As you can see:

WSGIScriptAlias /Test /web/Test/apache/django.wsgi

<Directory /web/Test/apache>
   Order Deny,Allow
   Allow from all
</Directory>

<Directory /var/www/media>
Order Deny,Allow
Allow from all
</Directory>

<Directory /var/www>
Order Deny,Allow
Allow from all
</Directory>

<Directory /var/www/static>
Order Deny,Allow
Allow from all
</Directory>

I considered a firewall/router problem, but i think my ports are forwarded correclty, since i can access the local site with my external dns/ip.

Does anyone have an idea of what i am doing wrong?

Thank You.

--
Renato Beserra Sousa

Tom Evans

unread,
May 10, 2011, 9:46:25 AM5/10/11
to django...@googlegroups.com
On Tue, May 10, 2011 at 12:39 PM, Renato Beserra
<renato...@gmail.com> wrote:
> Hi,
>
> I think I have a really basic problem but I didn't find a solution searching
> the web.
>
> I have a Django application running on my local apache, and I can access
> everything locally whitout any problems. But when i try to access it from an
> external host, the server timeout.I guess it has something to do with apache
> permissions, but my httpd.conf file looks similar to the examples i found
> online. As you can see:

Why do you guess that? What exactly gets shown in the apache error and
access logs after you access it from an external host and it times
out?

If the error log complains about permissions, show the exact message.
If nothing is displayed in neither the error log nor the access log,
then the problem is not with apache, but with your routing and/or
firewalls.

Cheers

Tom

Renato Beserra

unread,
May 10, 2011, 11:58:56 AM5/10/11
to django...@googlegroups.com
I guessed that the problem was at my httpd.conf because i am a newbie at apache configuration. But i looked at both logs you indicated and they show absolutely no response to external request. I checked my router again and the port 80 is forwarded to the right internal IP and the router firewall seems right too. I tried DMZ but nothing has changed. I think that the absence of response in the logs indicate a routing/firewall problem, but the router configuration appears to be right. What do you think?

And Thank you for the first answer.




--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
Renato Beserra Sousa

Stuart MacKay

unread,
May 10, 2011, 12:10:50 PM5/10/11
to django...@googlegroups.com
Can you telnet to the web server: telnet <server ip address> 80
(assuming it is listening on port 80). That would at least tell you
whether your LAN setup was correct.

Stuart MacKay
Lisboa, Portugal

Renato Beserra

unread,
May 10, 2011, 12:52:04 PM5/10/11
to django...@googlegroups.com
I am not sure I got your suggestion and I don't have telnet working but i have similar rules for django production server on port 8000 and ssh and they works just fine from external hosts. Does that help?

Thanks.

2011/5/10 Stuart MacKay <sma...@flagstonesoftware.com>
Can you telnet to the web server: telnet <server ip address> 80 (assuming it is listening on port 80). That would at least tell you whether your LAN setup was correct.

Stuart MacKay
Lisboa, Portugal

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
Renato Beserra Sousa

Stuart MacKay

unread,
May 10, 2011, 1:23:19 PM5/10/11
to django...@googlegroups.com
The idea behind using telnet was simply to verify the network connections - that the web server is listening on the correct port and that your router was working correctly.

Stuart

Renato Beserra

unread,
May 10, 2011, 10:16:35 PM5/10/11
to django...@googlegroups.com
Now I understand you, Stuart. Thanks to both yours and Tom's advices i was able to notice my network was fine and that still my apache did not get any external requests. I suspected that my ISP was blocking the port 80 and so i changed to 85 and everything is running smoothly.

Thank you very much!



2011/5/10 Stuart MacKay <sma...@flagstonesoftware.com>



--
Renato Beserra Sousa
Reply all
Reply to author
Forward
0 new messages