[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. </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). It's a currency converter app with a Google Maps GUI (not that \
impressive, I know). I want to add a reverse proxy to it that would serve \
HTTP/2 upgrade requests. </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. I have a slow \
connection, though, which is a problem. I hope it won't be too bad. The \
app URL is <a href="https://dragonosman.dynu.net:5501/" \
id="LPlnk502701">https://dragonosman.dynu.net:5501/</a> and you can go here: <a \
href="https://www.osmanzakir.dynu.net" \
id="LPNoLPOWALinkPreview_0">https://www.osmanzakir.dynu.net</a> 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). </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? What \
do I need to do exactly? </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. What I changed \
was:</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)"> Define SRVROOT \
"E:/programming/visual_studio_2019/Projects/currency_converter/x64/Release"</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> ServerRoot <span style="color: rgb(0, 0, 0); font-family: \
Calibri, Helvetica, sans-serif; font-size: 12pt;">"${SRVROOT}"</span></div> \
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> "</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)"> "</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> DocumentRoot "${SRVROOT}"
<div><Directory "${SRVROOT}"></div>
<div> #</div>
<div> # Possible values for the Options directive are "None", \
"All",</div> <div> # or any combination of:</div>
<div> # Indexes Includes FollowSymLinks SymLinksifOwnerMatch \
ExecCGI MultiViews</div> <div> #</div>
<div> # Note that "MultiViews" must be named *explicitly* --- \
"Options All"</div> <div> # doesn't give it to you.</div>
<div> #</div>
<div> # The Options directive is both complicated and important. \
Please see</div> <div> # \
http://httpd.apache.org/docs/2.4/mod/core.html#options</div> <div> # for \
more information.</div> <div> #</div>
<div> Options Indexes FollowSymLinks</div>
<div><br>
</div>
<div> #</div>
<div> # AllowOverride controls what directives may be placed in \
.htaccess files.</div> <div> # It can be "All", \
"None", or any combination of the keywords:</div> <div> # \
AllowOverride FileInfo AuthConfig Limit</div> <div> #</div>
<div> AllowOverride FileInfo</div>
<div><br>
</div>
<div> #</div>
<div> # Controls who can get stuff from this server.</div>
<div> #</div>
<div> Require all granted</div>
</Directory><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> "</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. 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). </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. Do I have that \
right? </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> . 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. Someone who's good at C++ looking at my code would be \
a big help here. 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