[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [users@httpd] Reverse Proxy for Web Application (or adding it as extension to Apache web server)

I already attached the code in an earlier message.  If you want to know what my application does and what the server I wrote is doing, please read the code.  I also explained it in comments in the code, including at the very top of the C++ and _javascript_ files.  

What I copied over were the HTML, CSS, _javascript_ and .exe files, as well as some other files required for the application that Visual Studio created (currency_converter.ipbd, currency_converter.iobj, currency_converter.pdb), when I compiled and linked under the Release build configuration.  

If I go back to the reverse proxy route, I'd have to take out the environment variables I guess (unless there's a way to hide the Google Maps API Key and the currency API Access Key that I can use with a reverse proxy in Apache, so that I don't have put the keys in there directly--is there something like this?).  Either way, I do still need to know how to configure the vhosts configuration file (and the reverse proxy configuration in the httpd.conf file if I do go back to that--which I think I'll have to) so that when I navigate to the virtual host in the browser, I'll see the application I made.  

I need to know how to do all of this correctly on Apache: the reverse proxy configuration and the virtual host set up, with the mod_proxy, mod_proxy_http, and any other modules I need for this.  I could just change the C++ server application into a CGI or FastCGI one, but I'll need to learn how to do that first.  While I need to find out how to correctly configure a reverse proxy and virtual host as well anyway, at least I won't have to do anything to my C++ code.  

From: Eric Covener <covener@xxxxxxxxx>
Sent: Sunday, September 9, 2018 6:00:33 AM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: [users@httpd] Reverse Proxy for Web Application (or adding it as extension to Apache web server)
On Sat, Sep 8, 2018 at 8:13 PM Osman Zakir <osmanzakir90@xxxxxxxxxxx> wrote:
> I put the files for my app that I wanted to be served behind a reverse proxy into Apache's document root instead to have them served that way (is this a good idea?  Can Apache start the server as an extension like this?).

What files did you copy? You only mentioned before a C++ based HTTP
server.   I don't think copying anything like that to be served
directly by Apache would help.
There are much more involved/estoeric solutions in this area, but they
wouldn't just be a matter of copying files.  These options would be
FastCGI or writing an Apache module. Both are much more complicated
than a reverse proxy if you already have a backend HTTP server.

It's not clear why you want anything in front of your c++ http server.
But you are really missing the basics of how multiple
servers/processes will be interacting.

To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx