# Apache proxypass

## misc

Hi, I've got proxypass setup on our Apache server which proxypasses to a number of hosts behind it, all working fine, except one; an MS CRM server (running IIS obviously). It keeps asking for a username and password even though the correct one has been typed in. Here is my proxypass settings:

```

<VirtualHost *:80>

    ServerName crm.mydomain.com

    ProxyPass / http://192.168.3.55/

    ProxyPassReverse / http://192.168.3.55/

    ProxyPreserveHost On

    ErrorLog logs/crm_error_log

</VirtualHost>

```

If I type in http://192.168.3.55 and then type the login details, it works fine. The logs on the IIS server show that the queries are hitting it, but nothing else. A number of other proxypasses are working to other IIS servers, just not this CRM one. Is there anything different I need to do to get it working with CRM?

----------

## dev-urandom

 *misc wrote:*   

> Hi, I've got proxypass setup on our Apache server which proxypasses to a number of hosts behind it, all working fine, except one; an MS CRM server (running IIS obviously). It keeps asking for a username and password even though the correct one has been typed in. Here is my proxypass settings:
> 
> ```
> 
> <VirtualHost *:80>
> ...

 

Does IIS use ntlm authentication. This happened to me once, and I was testing with a client that had ntlm support, and after the proxy pass, I was using lwp to access the page. As you can guess, the second worked while the first didn't and it took me some time to find where the problem was. 

There's nothing in theory that causes problems in the setup that you've described, unless you need to connect to random ports after the login. Please check the authentication mechanisms supported on the browser.

----------

## misc

Ah excellent, thanks a lot. I set it in IIS to Basic Authentication rather than Integrated Windows Authentication, and that did the trick.

Thanks.

----------

## misc

Well, it turns out that I have to use NTLM. I researched into this more and it seems that you can use a mod_ntlm with Apache but I really am not sure if what I'm trying to do is even possible. I have this IIS server with NTLM running behind the Apache server and I want to pass proxy requests on to it as well as the authentication. Here is what I've got in my config:

```

<VirtualHost *:80>

    ServerName crm.mydomain.com

    ProxyPass / http://192.168.3.55/

    ProxyPassReverse / http://192.168.3.55/

    ProxyRequests Off

    ProxyPreserveHost On

    ErrorLog logs/crm_error_log

    <Location />

        AuthType NTLM

        NTLMAuth On

        NTLMBasicAuth on

        NTLMBasicRealm Portal

        NTLMAuthoritative On

        NTLMDomain ntdomain.local

        NTLMServer fileserver

        require valid-user

    </Location>

</VirtualHost>

```

I don't get any popup asking for a username, it just says that the login credentials were incorrect. Is it even possible to do this or do I have to put the CRM server on a public IP?

----------

