Hitting Mautic landing pages via proxy

I am testing the concept of using a reverse proxy to access landing pages.

Let’s say we have Mautic hosted at m.onedomain.com . We are trying to see if we can server landing pages at www.otherdomain.com.

I have it set up, but when I hit Mautic through the proxy it gives me a 404.



I check the logs, and my request is hitting the right Apache host, and the right path.



Any thoughts on what I might look at? Could the application be grabbing my request, noticing the different domain, and throwing a 404 back at me?



Request to http://www.otherdomain.com/category/test-landing-page via IIS proxy

Code:
10.x.x.x - - [17/Jan/2017:10:16:50 -0800] "GET /category/test-landing-page HTTP/1.1" 404 60813 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) ... Chrome/55.0.2883.87 Safari/537.36"

Request to http://m.onedomain.com/category/test-landing-page directly
Code:
10.x.x.x - - [17/Jan/2017:10:17:05 -0800] "GET /category/test-landing-page HTTP/1.1" 200 3213 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) ... Chrome/55.0.2883.87 Safari/537.36"

I am testing the concept of using a reverse proxy to access landing pages.
Let’s say we have Mautic hosted at m.onedomain.com . We are trying to see if we can server landing pages at www.otherdomain.com.
I have it set up, but when I hit Mautic through the proxy it gives me a 404.

I check the logs, and my request is hitting the right Apache host, and the right path.

Any thoughts on what I might look at? Could the application be grabbing my request, noticing the different domain, and throwing a 404 back at me?

Request to http://www.otherdomain.com/category/test-landing-page via IIS proxy

10.x.x.x - - [17/Jan/2017:10:16:50 -0800] "GET /category/test-landing-page HTTP/1.1" 404 60813 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) ... Chrome/55.0.2883.87 Safari/537.36"

Request to http://m.onedomain.com/category/test-landing-page directly

10.x.x.x - - [17/Jan/2017:10:17:05 -0800] "GET /category/test-landing-page HTTP/1.1" 200 3213 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) ... Chrome/55.0.2883.87 Safari/537.36"

Oh, great suggestion.

Both domains are available to each other (Mautic can ping and ‘wget’ pages from alternative domain and alternate domain can ping and browse Mautic).

Yes, and correct. IIS and AAR.
Seems to proxy through properly, according to Apache logs on Mautic server. Almost feels like I need an Apache or Mautic setting change.

Rough web.config on IIS:

<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="ReverseProxyInboundRule1" stopProcessing="true"> <match url="(.*)" /> <action type="Rewrite" url="http://m.onedomain.com/{R:1}" /> <serverVariables> <set name="HTTP_ACCEPT_ENCODING" value="" /> </serverVariables> </rule> </rules> </rewrite> </system.webServer> </configuration>

I think I figured it out. The IIS proxy set up works great, the issue comes when I try to use a different path than what Mautic wants. For example, these don’t seem to be possible:

It seems that all works if folders are all equal:

This has to be a restriction on the Mautic side… no?

Note that to make it work for landing pages, I also had to create reverse proxy rewrite rules for /form/submit and /themes.