You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Eric Covener <co...@gmail.com> on 2019/01/15 02:00:05 UTC

Re: [users@httpd] About Using ProxyPass Directive

ProxyPass "/"
> "E:/programming/visual_studio_2017/Projects/currency_converter/x64/Release"
>

The 2nd parameter should be a URL where your backend service is listening
for HTTP requests, but you put a path to where you compiled some binaries.
Those are not interchangeable.

If there's no URL where your currency converter works, you won't get any
benefit of setting up a reverse proxy.

Re: [users@httpd] About Using ProxyPass Directive

Posted by Eric Covener <co...@gmail.com>.
>
> I put in the path to where the executable file that's also the web server
> is.
>

That won't accomplish anything, a URL is required.

Re: [users@httpd] About Using ProxyPass Directive

Posted by Eric Covener <co...@gmail.com>.
On Tue, Jan 15, 2019 at 9:47 AM Osman Zakir <os...@hotmail.com> wrote:
>
> I still get these warnings when I try run Apache:
> "
> [Tue Jan 15 19:38:22.300249 2019] [env:warn] [pid 12988:tid 556] AH01506: PassEnv variable <apikey> was undefined
> [Tue Jan 15 19:38:22.301248 2019] [env:warn] [pid 12988:tid 556] AH01506: PassEnv variable <accesskey> was undefined
> "

PassEnv doesn't take a value. It takes 1 or more native environment
variable names. They should already have the value you want in the
environment that launches apache.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] About Using ProxyPass Directive

Posted by Osman Zakir <os...@hotmail.com>.
I still get these warnings when I try run Apache:
"
[Tue Jan 15 19:38:22.300249 2019] [env:warn] [pid 12988:tid 556] AH01506: PassEnv variable <apikey> was undefined
[Tue Jan 15 19:38:22.301248 2019] [env:warn] [pid 12988:tid 556] AH01506: PassEnv variable <accesskey> was undefined
"

How do I set the PassEnv value correctly?  Right now it's like this:
"
PassEnv apikey "<apikey_value>"
PassEnv accesskey "<accesskey_value>"
"

Is that wrong? Note: I'm not putting the actual API keys here.  They're just placeholders.

By the way, it's good to put the ServerName in httpd.conf as something other than the actual name of the server app I want to put behind the reverse proxy, right?  Or would it be better to give it the same name as the actual app?
________________________________
From: Jonathon Koyle <li...@gmail.com>
Sent: Tuesday, January 15, 2019 6:47 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] About Using ProxyPass Directive

By default, the httpd.conf has the directive Listen 80.  If you don't want Apache to listen on 80 you will need to remove/change it.  You are allowed to have as many listen directives as you want Apache to bind.  ServerName does not usually include a port, and does not specify what IP or port Apache binds to.

On Tue, Jan 15, 2019, 06:28 Osman Zakir <os...@hotmail.com> wrote:
@Eric Covener <ma...@gmail.com> I got the port forwarding to work and am now able to get my app using my external IP address on port 8443 (but it's not using SSL right now).  I still need to actually get Apache to start before I put my app behind the reverse proxy, and port 80 is being used by the system.  I tried to change the "ServerName" value to 0.0.0.0:8080<http://0.0.0.0:8080>, but it's still trying to connect on 0.0.0.0:80<http://0.0.0.0:80> which is giving an about it not being able to bind to any listening ports.  I'll see if I can find another setting in the httpd.conf file to use in the meantime, but for now I'll also ask this: what do you suggest I do?

Re: [users@httpd] About Using ProxyPass Directive

Posted by Jonathon Koyle <li...@gmail.com>.
By default, the httpd.conf has the directive Listen 80.  If you don't want
Apache to listen on 80 you will need to remove/change it.  You are allowed
to have as many listen directives as you want Apache to bind.  ServerName
does not usually include a port, and does not specify what IP or port
Apache binds to.

On Tue, Jan 15, 2019, 06:28 Osman Zakir <osmanzakir90@hotmail.com wrote:

> @Eric Covener <co...@gmail.com>I got the port forwarding to work and am
> now able to get my app using my external IP address on port 8443 (but it's
> not using SSL right now).  I still need to actually get Apache to start
> before I put my app behind the reverse proxy, and port 80 is being used by
> the system.  I tried to change the "ServerName" value to 0.0.0.0:8080,
> but it's still trying to connect on 0.0.0.0:80 which is giving an about
> it not being able to bind to any listening ports.  I'll see if I can find
> another setting in the httpd.conf file to use in the meantime, but for now
> I'll also ask this: what do you suggest I do?
>

Re: [users@httpd] About Using ProxyPass Directive

Posted by Osman Zakir <os...@hotmail.com>.
@Eric Covener <ma...@gmail.com> I got the port forwarding to work and am now able to get my app using my external IP address on port 8443 (but it's not using SSL right now).  I still need to actually get Apache to start before I put my app behind the reverse proxy, and port 80 is being used by the system.  I tried to change the "ServerName" value to 0.0.0.0:8080, but it's still trying to connect on 0.0.0.0:80 which is giving an about it not being able to bind to any listening ports.  I'll see if I can find another setting in the httpd.conf file to use in the meantime, but for now I'll also ask this: what do you suggest I do?

Re: [users@httpd] About Using ProxyPass Directive

Posted by Osman Zakir <os...@hotmail.com>.
From: Eric Covener <co...@gmail.com>
Sent: Tuesday, January 15, 2019 7:00 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] About Using ProxyPass Directive



ProxyPass "/" "E:/programming/visual_studio_2017/Projects/currency_converter/x64/Release"

>The 2nd parameter should be a URL where your backend service is listening for HTTP requests, but you put a path to where you >compiled some binaries.
>Those are not interchangeable.

>If there's no URL where your currency converter works, you won't get any benefit of setting up a reverse proxy.

I put in the path to where the executable file that's also the web server is.  That's the docroot, since it's also where the static assets are.  As for a URL where it works, it's only my internal IP so far.

In my router's settings, under NAT > Virtual Servers, I have these two rules for the port forwarding:
Server Name     External Port Start     External Port End       Protocol        Internal Port Start     Internal Port End       Server IP Address       WAN Interface   LAN Loopback    Enable/Disable  Remove
 Secure Web Server (HTTPS)       8443    8443    TCP     8443    8443    192.168.10.9    ppp2.1 Disabled
 HTTP    8080    8080    TCP     8080    8080    192.168.10.9    ppp2.1 Disabled


192.168.10.9 is my internal IP address.  I'll try again after setting my server app first and then Apache, but for now, does this look okay to you?