Due to company policy we have the following infrastructure in place: - external server with fixed ip address (which I'll name extsrv) - internal router also with fixed ip address (which I'll name routersrv) - vmware server (named vmsrv) - vmware guest with Django (djangosrv)

We had a django based application (which I'm going to name django) running on extsrv (natively) and it worked quite nicely without problems. I was asked to migrate it to djangosrv and configure the necessary redirection. After doing so, all dynamically generated urls get broken if I try to access from any point other thant vmsrv (I should point out that djangosrv itself is not visible outside vmsrv). However, when I write my url to access from vmsrv, everything works fine. Does anyone have an idea on what the problem might be? More importantly, how might I be able to debug this situation?

To clarify a bit, something like: https://routersrv/private/django fails but if I enter: https://vmsrv/private/django everything works fine

Thanks for any help.

I'll post all apache configuration below (from the different servers): - from extsrv

    Redirect /private/django <https>://routersrv/private/django
  • from routersrv

    <Location /private/django>
      ProxyPass <https>://vmsrv/private/django
      ProxyPassReverse <https>://vmsrv/private/django
    
      AuthzLDAPAuthoritative off
      AuthBasicProvider ldap
      AuthName "Private Area"
      AuthLDAPURL <ldap>://localhost/ou=Users,dc=company,dc=com?uid??(|(employeeType=full)(employeeType=external))
      require valid-user
    </Location>
    
  • from vmsrv

    RedirectMatch permanent ^/private$ /private/django/
    RedirectMatch permanent ^/private/$ /private/django/
    RedirectMatch permanent ^/private/index.html$ /private/django/
    RedirectMatch permanent ^/private/start$ /private/django/
    RedirectMatch permanent ^/private/start/$ /private/django/
    
    <Location /private/django>
      SSLRequireSSL
      ProxyPass <https>://djangosrv/private/django
      ProxyPassReverse <https>://djangosrv/private/django
      AuthType Basic
      AuthzLDAPAuthoritative off
      AuthBasicProvider ldap
      AuthName "Private Area"
      AuthLDAPURL <ldap>://localhost/ou=Users,dc=company,dc=com?uid??(|(employeeType=full)(employeeType=external))
      require valid-user
    </Location>
    
  • from djangosrv

    Alias /private/django/admin-media /usr/lib/python2.6/site-packages/django/contrib/admin/media
    Alias /private/django/media /opt/django/djangoweb/media
    
    WSGIScriptAlias /private/django /opt/django/djangoweb/wsgi_handler.py
    WSGIDaemonProcess django user=django group=django processes=1 threads=10
    WSGIProcessGroup django
    WSGISocketPrefix /tmp/wsgi
    
    <Location /private/django>
        SSLRequireSSL
        AuthType Basic
        AuthzLDAPAuthoritative off
        AuthBasicProvider ldap
        AuthName "Private Area"
        AuthLDAPURL <ldap>://vmsrv/ou=Users,dc=company,dc=com?uid??(|(employeeType=full)(employeeType=external))
        require valid-user
    </Location>
    
    <Location /private/django/media/attachments>
        Order allow,deny
        Deny from all
    </Location>
    
link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.