I have setup an Apache server inside my domain and have been creating VirtualHost in the httpd-vhosts.conf file. Up until now this has worked without issue, I have a few DNS entries externally that point to our gateway and the VirtualHost's either direct the request to a site on that server or I use a ProxyPass to send the traffic to the server that is hosting another site.

The new site we have installed does react the same as the other sites in that the standard ProxyPass line returns with a 401 error unauthorised access. If I go straight to the hostname rather than the VirtualHost Server name the page returns with no issue.


ServerName test
ServerAlias test.domain.org.uk
ProxyPass / http://SERVERNAME/SSM/
ProxyPassReverse / http://SERVERNAME/SSM/

ServerAdmin admin@redirectedurl.com

ErrorLog "logs/test-access.log"
CustomLog "logs/test-access.log" common

So if I go to http://test or http://test.domain.org.uk I get the 401, if I go to http://SERVERNAME/SSM I don't have an issue.

test and test.domain.org.uk are both in DNS and if I point their CNAME's to the actual server rather than the webserver the pages load fine. But that doesn't help as I would like to have this site available externally.

The web.config file for this site has a rewrite rule which is no different than other sites I have setup like this.

            <rule name="Proxy" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
                <match url="*" />
                <action type="Rewrite" url="http://SERVERNAME/SSM/{R:1}" />

If I add /FormsLogin.aspx after /SSM on all the url's I do get a bit further but the page doesn't load correctly and sometimes returns with a proxy error.

The site is running on IIS and previous searches for the issue pointed me to enabling Anonymous Authentication, when I check, it is enabled but the Anonymous User Identity is set to specific User IUSR, would that have anything to do with the denied access from the webserver? Is there a way to set the rewrite to behave as if it is IUSR?

Hopefully someone can point me in the right direction.

  • I have got a bit further and realised something simple, I am still not actually any further forward but adding the thing I noticed as it might help. In the vhost file I had the path as servername/ssm which should of routed to where I wanted it to, but the response was to add the full path which included the ssm directory. So essentially the path didn't exist, my alias was including the ssm folder but the page would load with ssm (eg servername/ssm/ssm). – JasonPZOO May 20 '19 at 10:55
  • If I remove ssm from the vhost path the default IIS page loads, if I then add the ssm directory to the address bar, the page loads correctly. I am stuck now as I don't know how to get the default page to load the ssm directory or I don't know how to have the SSM directory respond without adding the extra ssm in the link. – JasonPZOO May 20 '19 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.