Public web site and Piwik app is in internal LAN

We have a public web server eg www.johnsmith.com that uses Apache.
It has an internal IP address and an external IP address.
We also have a server hosting Piwik but this only in the internal LAN.
Apache httpd.conf has a redirect in this setting.

Is it possible, then, for some one to make a HTTP request in his browser to retrieve the page from the web server . Web server switches page to piwik server which is internal.

Set up a proxy server to pass the tracking request to the internal server.

Thank you for replying.
I am still not sure how to configure the proxy server.

In httpd.conf, I have something like this:

ServerName www.johnsmith.com
ServerAlias *
Redirect permanent / hhttp://www.johnsmithpiwik.com/

wwww.johnsmithpiwik.com is not available in the internet and only on our internal LAN.

But I think the http redirect 301 works like the browser making a request to wwww.johnsmithpiwik.com/ and it will never be able connect.

Uh, no. Do a web search for “apache reverse proxy setup”. There are a few tutorials out there that will explain this in better detail.

We have one application server running WebSphere and another separate web server running Apache. There is a plug in between the web and app server. Do you think I can configure the piwik server to run as another application server and then Apache listens on another port (say 6976) to make a connection between the piwik server and the Apache web server? Will this concept work? In that way only the Apache web server is exposed to the Internet.

I got it working using proxy settings in apache’s configuration file. It was easy.