[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-users
Subject:    [users@httpd] Apache httpd as reverse proxy for HTTP/2
From:       Osman Zakir <osmanzakir90 () hotmail ! com>
Date:       2020-08-28 1:13:20
Message-ID: SG2PR06MB3158AA850068529411BE5999D3410 () SG2PR06MB3158 ! apcprd06 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi.

I have a web app I'm hosing on my laptop on HTTP/1.1 with HTTPS (the server=
 code is in C++ and it uses the Boost.BEAST library for the HTTP/S function=
ality).  It's a currency converter app with a Google Maps GUI (not that imp=
ressive, I know).  I want to add a reverse proxy to it that would serve HTT=
P/2 upgrade requests.

Right now the app is working on my laptop.  I have a slow connection, thoug=
h, which is a problem.  I hope it won't be too bad.  The app URL is https:/=
/dragonosman.dynu.net:5501/ and you can go here: https://www.osmanzakir.dyn=
u.net to check if the app is running (this is my portfolio site and the app=
 is shown as the first one in my projects section; there's a script that ch=
ecks if the app is running and tells you if it is).

Do I need to set up a virtual host on Apache for this?  What do I need to d=
o exactly?

I've attached a modified httpd.conf file.  What I changed was:

"
Define SRVROOT "E:/programming/visual_studio_2019/Projects/currency_convert=
er/x64/Release"
ServerRoot "${SRVROOT}"
"
as well as setting it to listen on port 5502, and also did this:

"
DocumentRoot "${SRVROOT}"
<Directory "${SRVROOT}">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiV=
iews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess fil=
es.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride FileInfo

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>
"

I set that directory in Drive E as the server root because that's where the=
 app is being served from.  And it does work (at least it did before I trie=
d to set up a reverse proxy, and I hope I can get it to work with the rever=
se proxy as well).

I'm thinking that I'll have to have both servers running and have Apache re=
spond to requests to upgrade to HTTP/2.  Do I have that right?

Anyway, the source code is on GitHub here: https://github.com/DragonOsman/c=
urrency_converter .  I don't know how to find out from the HTTP request hea=
der if there's an upgrade request, so first I need to figure that out.  Som=
eone who's good at C++ looking at my code would be a big help here.  Thanks=
.


[Attachment #5 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} \
</style> </head>
<body dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> Hi.&nbsp;&nbsp;</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> I have a web app I'm hosing on my laptop on HTTP/1.1 with HTTPS \
(the server code is in C++ and it uses the Boost.BEAST library for the HTTP/S \
functionality).&nbsp; It's a currency converter app with a Google Maps GUI (not that \
impressive, I know).&nbsp; I want to add  a reverse proxy to it that would serve \
HTTP/2 upgrade requests.&nbsp;&nbsp;</div> <div \
style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"> \
<br> </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> Right now the app is working on my laptop.&nbsp; I have a slow \
connection, though, which is a problem.&nbsp; I hope it won't be too bad.&nbsp; The \
app URL is <a href="https://dragonosman.dynu.net:5501/" \
id="LPlnk502701">https://dragonosman.dynu.net:5501/</a>&nbsp;and you can go here: <a \
href="https://www.osmanzakir.dynu.net" \
id="LPNoLPOWALinkPreview_0">https://www.osmanzakir.dynu.net</a>&nbsp;to check if the \
app is running (this is my portfolio site and the app is shown as the first one in my \
projects section; there's a script that checks if  the app is running and tells you \
if it is).&nbsp;&nbsp;</div> <div style="font-family:Calibri,Helvetica,sans-serif; \
font-size:12pt; color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> Do I need to set up a virtual host on Apache for this?&nbsp; What \
do I need to do exactly?&nbsp;&nbsp;</div> <div \
style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"> \
<br> </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> I've attached a modified httpd.conf file.&nbsp; What I changed \
was:</div> <div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
&quot;</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> Define SRVROOT \
&quot;E:/programming/visual_studio_2019/Projects/currency_converter/x64/Release&quot;</div>
 <div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> ServerRoot&nbsp;<span style="color: rgb(0, 0, 0); font-family: \
Calibri, Helvetica, sans-serif; font-size: 12pt;">&quot;${SRVROOT}&quot;</span></div> \
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> &quot;</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> as well as setting it to listen on port 5502, and also did \
this:</div> <div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> &quot;</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> DocumentRoot &quot;${SRVROOT}&quot;
<div>&lt;Directory &quot;${SRVROOT}&quot;&gt;</div>
<div>&nbsp; &nbsp; #</div>
<div>&nbsp; &nbsp; # Possible values for the Options directive are &quot;None&quot;, \
&quot;All&quot;,</div> <div>&nbsp; &nbsp; # or any combination of:</div>
<div>&nbsp; &nbsp; # &nbsp; Indexes Includes FollowSymLinks SymLinksifOwnerMatch \
ExecCGI MultiViews</div> <div>&nbsp; &nbsp; #</div>
<div>&nbsp; &nbsp; # Note that &quot;MultiViews&quot; must be named *explicitly* --- \
&quot;Options All&quot;</div> <div>&nbsp; &nbsp; # doesn't give it to you.</div>
<div>&nbsp; &nbsp; #</div>
<div>&nbsp; &nbsp; # The Options directive is both complicated and important. \
&nbsp;Please see</div> <div>&nbsp; &nbsp; # \
http://httpd.apache.org/docs/2.4/mod/core.html#options</div> <div>&nbsp; &nbsp; # for \
more information.</div> <div>&nbsp; &nbsp; #</div>
<div>&nbsp; &nbsp; Options Indexes FollowSymLinks</div>
<div><br>
</div>
<div>&nbsp; &nbsp; #</div>
<div>&nbsp; &nbsp; # AllowOverride controls what directives may be placed in \
.htaccess files.</div> <div>&nbsp; &nbsp; # It can be &quot;All&quot;, \
&quot;None&quot;, or any combination of the keywords:</div> <div>&nbsp; &nbsp; # \
&nbsp; AllowOverride FileInfo AuthConfig Limit</div> <div>&nbsp; &nbsp; #</div>
<div>&nbsp; &nbsp; AllowOverride FileInfo</div>
<div><br>
</div>
<div>&nbsp; &nbsp; #</div>
<div>&nbsp; &nbsp; # Controls who can get stuff from this server.</div>
<div>&nbsp; &nbsp; #</div>
<div>&nbsp; &nbsp; Require all granted</div>
&lt;/Directory&gt;<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> &quot;</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> I set that directory in Drive E as the server root because that's \
where the app is being served from.&nbsp; And it does work (at least it did before I \
tried to set up a reverse proxy, and I hope I can get it to work with the reverse \
proxy as well).&nbsp;&nbsp;</div> <div \
style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"> \
<br> </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> I'm thinking that I'll have to have both servers running and have \
Apache respond to requests to upgrade to HTTP/2.&nbsp; Do I have that \
right?&nbsp;&nbsp;</div> <div style="font-family:Calibri,Helvetica,sans-serif; \
font-size:12pt; color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> Anyway, the source code is on GitHub here: <a \
href="https://github.com/DragonOsman/currency_converter" id="LPNoLPOWALinkPreview_0"> \
https://github.com/DragonOsman/currency_converter</a>&nbsp;.&nbsp; I don't know how \
to find out from the HTTP request header if there's an upgrade request, so first I \
need to figure that out.&nbsp; Someone who's good at C++ looking at my code would be \
a big help here.&nbsp; Thanks.</div> <div class="_Entity _EType_OWALinkPreview \
_EId_OWALinkPreview_0 _EReadonly_1"></div> <br>
</body>
</html>


["httpd.conf" (application/octet-stream)]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic