views:

639

answers:

5

The "main" one should be IIS. Is there an option to address the Apache without typing in the port-number The reason for this is: I cannot get Django to work on IIS Any ideas will be appreciated

+5  A: 

You could set up Apache on a different port, then use redirects or proxying on IIS to get people to the Apache port without them having to type it.

chaos
I thought reverse proxy on IIS was only available on ISA server? Please correct me if i'm wrong. In any case apache can also be used as a reverse proxy.
jms
A: 

It is absolutely possible to do that.

cdonner
+5  A: 

The only way to avoid typing in the port number is to set up a proxy, which could be either one of the two webservers. That way, the proxy makes the connection on the alternate port and the client doesn't have to know where it is.

I don't know about IIS, but on Apache, you would have to load mod_proxy (and I think, mod_proxy_http) and then do something like this:

ProxyRequests Off

<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>

ProxyPass /foo http://foo.example.com/bar
ProxyPassReverse /foo http://foo.example.com/bar

Also check the docs for mod_proxy online.

You might also want to look at lightweight webservers such as lighttpd, if you're going to have two running. It's a common setup to have a light webserver taking specific tasks away from the main one. (Apache for dynamic and lighttpd for static content is one typical example).

There's also other possibilities, ranging from getting more fancy, such as

  • Have a third webserver doing only the proxying and the other two on alternate ports
  • Have them running on the same port but two IPs and hide that fact via your network setup

to attacking the root cause by either

  • finding somenone who knows how to get Django running on IIS
  • moving from IIS to another webserver

Of course, I have no clue what might be appropriate for your situation.

Hanno Fietz
+3  A: 

If this is a matter of running Django on a server that already needs IIS, you can run django on IIS directly, thanks to efforts like Django-IIS and PyISAPIe. I think it would be preferable to NOT run a second web server when all its going to be doing is proxying requests out to a third server, the Django code.

ironfroggy
A: 

Does anyone know how to setup IIS as main server on port 80 and to access an apache server on port 8080 throuth port 80?

www.mysite/iisSite www.mysite/apacheSite

Hanno Fietz answer was for apache. I need the other direction.

Thanks.