'Proxypass and reverse proxy from apache to nginx

I have subdomain website http://subdomain.mywebsite.com/path which is hosted on Siteground and running on nginx server. I want the users should be able to access the above path or its subpaths through main website URL lets say http://mywebsite.com/path which is running on apache server.

I have tried to proxypass and reverseproxypass using following in apache configuration file on my main website:-

<Location "/path">
        ProxyPass "http://subdomain.mywebsite.com/path"
        ProxyPassReverse "http://subdomain.mywebsite.com/path"
    </Location>

When i access the page http://mywebsite.com/path I get 404 page of siteground whereas the same path is directly accesible using http://subdomain.mywebsite.com/path.

I have been trying to find the solution but could not get it working.



Solution 1:[1]

You can use the below configuration:

ProxyPass /path http://subdomain.mywebsite.com/path
ProxyPassReverse /path http://subdomain.mywebsite.com/path

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pandurang