[users@httpd] Using Apache's C API for HTTP/2 and HTTP/3?

2022-08-01 Thread Osman Zakir
I have this server app I've 
made, with the backend code being in C++.  I have an "unknown protocol" error 
that I get when running the openssl s_client​ command to test the server certs 
and such, coming the ClientHello, which I think is because of an HTTP/2 upgrade 
request.

Is it possible for me to use Apache's API to support HTTP/2?  Not using the 
httpd as a reverse proxy but instead directly using Apache's C/C++ functions 
that allow to use HTTP/2.


[users@httpd] Apache httpd as reverse proxy for HTTP/2

2020-08-27 Thread Osman Zakir
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 
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.

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 
https://dragonosman.dynu.net:5501/ and you can go here: 
https://www.osmanzakir.dynu.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 checks 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 do 
exactly?

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

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

"
DocumentRoot "${SRVROOT}"

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# 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 files.
# 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

"

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).

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?

Anyway, the source code is on GitHub here: 
https://github.com/DragonOsman/currency_converter .  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.



httpd.conf
Description: httpd.conf

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

Re: [users@httpd] Port Forwarding Help?

2019-01-21 Thread Osman Zakir
I can see the app on localhost on either port 8000 or port 8081.  What am I 
doing wrong?


Re: [users@httpd] Port Forwarding Help?

2019-01-21 Thread Osman Zakir
This is what I have in the conf file at the bottom:
"

Options All​
Options Indexes FollowSymLinks​
AllowOverride None​
Require all granted​
​
​
​
ServerAdmin osmanzaki...@hotmail.com​
ServerName dragonosman.dynu.net​
ServerAlias www.dragonosman.dynu.net​
ErrorLog "logs/dragonosman.dynu.net-error.log"​
CustomLog "logs/dragonosman.dynu.net-access.log" common​
ProxyPass "/" "http://192.168.10.12:5501/"​
ProxyPass "/?q=accesskey" "http://192.168.10.12:5501/?q=accesskey"​
​
"

And I added a forwarding rule for port 8000 for the router.  But I still can't 
see the app at my public IP address on port 8000.


Re: [users@httpd] Port Forwarding Help?

2019-01-21 Thread Osman Zakir
Wait, so it's fine if I use my internal IP address?  The app will be available 
on my public IP address in that case too?


Re: [users@httpd] Port Forwarding Help?

2019-01-21 Thread Osman Zakir
My server is listening on 
http://dragonosman.dynu.net:5501/.  Should I 
put that there then?  Also, should the ProxyPass directive go inside the 
VirtualHost tags or outside?


Re: [users@httpd] Port Forwarding Help?

2019-01-21 Thread Osman Zakir
The httpd.conf file is attached to this email.  The VirtualHost and ProxyPass 
stuff is at the bottom.  Please let me know what I messed up now, if anything 
at all.  And if there's something wrong, help me out with that.

The first parameter to the ProxyPass directive for "/" is currently the 
directory on my computer where the doc-root of the app is.  It's also where the 
server executable is.  If that's right, should I also put that directory for 
accesskey route (i.e. /?q=accesskey)?

When I try to get to "localhost:8081" in my browser now, I get an "Index of /" 
page and nothing more (8081 is the port Apache is listening on).  Trying to do 
"localhost:8000" gives an error (8000 is the reverse proxy port).


httpd.conf
Description: httpd.conf

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

Re: [users@httpd] Port Forwarding Help?

2019-01-21 Thread Osman Zakir
I need to know if I've set up the reverse proxy configuration correctly in the 
conf file, and also how to fix it I did something wrong.  And I also need to 
know how to correctly visit the app in the browser after I've set it up 
correctly and am forwarding the port that Apache is listening (if that's the 
only port I need to forward).


Re: [users@httpd] Port Forwarding Help?

2019-01-21 Thread Osman Zakir
I can't use port 80 or 433 for my external port because the router's using 
those ports.  8080 and 8443 are also being blocked by ISP.  So I had to use 
5501 and forward that.  I'll take away the forwarding rule for port 5501 if I 
can get the reverse proxy to work, though.

That being said, just now I tried to visit dragonosman.dynu.net:8000 after 
setting up port forwarding for port 8000, since I'm using that port for the 
VirtualHost setting in the httpd.conf file.  The file is attached to this 
message.

Do I also need to set up port forwarding for the port that Apache is listening 
on?  Because right now I can't get to my app in the browser through port 8000.  
On Chrome, I get this error: ERR_CONNECTION_REFUSED.  I asked on a Discord 
group I go to as well and one of the members there just told me that I only 
need to forward the port that Apache is listening on.  Is this correct?  
Because if so, I'll need to choose a different port because I'm having it 
listen on port 8080 which is being blocked by the ISP.


httpd.conf
Description: httpd.conf

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

[users@httpd] Reverse Proxy (Port Forwarding for just the port used in ProxyPass, or what?)

2019-01-20 Thread Osman Zakir
If I want to put my app behind Apache's reverse proxy, do I need to set up port 
forwarding for just the port that I set for the reverse proxy in ProxyPass 
directive, or do I also have to do it for the one Apache is listening on?

Also, I got a free DynDNS from dynu.com and I'm serving my app on port 5501 on 
it, but is there no way I can use a URL where specifying the port number isn't 
a requirement?  The URL is http://dragonosman.dynu.net:5501/ .  And if I want 
to get an SSL certificate for it, seeing as I'm hosting it on my own computer 
with a Dynamic DNS, how do I prove ownership of the domain when I try to use 
something like this? https://www.sslforfree.com/ .



Re: [users@httpd] Port Forwarding Help?

2019-01-20 Thread Osman Zakir
I found out that the problem was that I was using port 8080 which was blocked 
by my ISP.  I managed to get it to work using a different port (port 8443 
didn't work either).

Now I need to ask this: if I want to put my app behind Apache's reverse proxy, 
do I need to set up port forwarding for just the port that I set for the 
reverse proxy in ProxyPass directive, or do I also have to do it for the one 
Apache is listening on?

Also, I got a free DynDNS from dynu.com and I'm serving my app on port 5501 on 
it, but is there no way I can use a URL where specifying the port number isn't 
a requirement?  The URL is http://dragonosman.dynu.net:5501/ .  And if I want 
to get an SSL certificate for it, seeing as I'm hosting it on my own computer 
with a Dynamic DNS, how do I prove ownership of the domain when I try to use 
something like this? https://www.sslforfree.com/ .
SSL For Free - Free SSL Certificates in Minutes
Free SSL Certificate issued in less than a minute. 100% Free Forever. Never pay 
for SSL again. Thanks to Letsencrypt the first non-profit CA.. Widely Trusted. 
Our free SSL certificates are trusted in 99.9% of all major browsers.
www.sslforfree.com




[users@httpd] Port Forwarding Help?

2019-01-19 Thread Osman Zakir
I'm not sure if this is okay to ask here, but I'll try anyway.

I tried to set up port forwarding but the port is still coming up as closed 
when I check on canyouseeme.org (it says "Connection timed out").  And while I 
can get to my router's settings using my Default Gateway IP address, trying to 
do so with my computer's own private IP address doesn't work for some reason 
(all I see is a blank page--the login form doesn't come up either).

I asked here as well: 
https://www.techsupportforum.com/forums/f137/port-forwarding-not-working-webserver-application-1234416.html#post7723316
 . But no reply yet.
Port Forwarding Not Working (Webserver Application) - Tech Support 
Forum
I have a webserver application I wrote that I'm trying to set up port 
forwarding for, but it's not working. The port is still closed. I'm using a 
VDSL2 router/modem (2in1) issued by the PTCL company (I
www.techsupportforum.com




Re: [users@httpd] About Using ProxyPass Directive

2019-01-15 Thread Osman Zakir
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  was undefined
[Tue Jan 15 19:38:22.301248 2019] [env:warn] [pid 12988:tid 556] AH01506: 
PassEnv variable  was undefined
"

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

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 
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 
mailto:osmanzaki...@hotmail.com> wrote:
@Eric Covener <mailto:cove...@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

2019-01-15 Thread Osman Zakir
@Eric Covener  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

2019-01-14 Thread Osman Zakir
From: Eric Covener 
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 LoopbackEnable/Disable  Remove
 Secure Web Server (HTTPS)   84438443TCP 84438443
192.168.10.9ppp2.1 Disabled
 HTTP80808080TCP 80808080192.168.10.9ppp2.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?


[users@httpd] Re: About Using ProxyPass Directive

2019-01-14 Thread Osman Zakir
Adding to previous message: I set up port forwarding on ports 8080 (for HTTP) 
and 8443 (for HTTPS) for my internal IP address on my router and I also put in 
my IP address for the DMZ host.

Just now when I tried to start httpd as a service (I had to do it as an 
Administrator because I was getting "Access is denied" errors otherwise), I got 
this message:
"
[Tue Jan 15 01:42:46.023403 2019] [env:warn] [pid 10636:tid 500] AH01506: 
PassEnv variable  was undefined
[Tue Jan 15 01:42:46.027402 2019] [env:warn] [pid 10636:tid 500] AH01506: 
PassEnv variable  was undefined​
AH00526: Syntax error on line 556 of C:/Apache24/conf/httpd.conf:​
ProxyPass URL must be absolute!: 
E:/programming/visual_studio_2017/Projects/currency_converter/x64/Release
"

I hid the values of the environment variables here because they're API keys.  
I've set them using the PassEnv directive like this:
"
PassEnv apikey ""
PassEnv accesskey ""
"

Did I do it wrong?  If so, please help me fix it.

And why is it (as I interpret it) saying that the URL is not absolute?  The 
application I want to deploy behind the reverse proxy is at that location on my 
computer.  Do I need to use the DDNS subdomain URL I got, or is there something 
else I'm missing?  If I give it the DDNS subdomain URL, how will it know where 
the app's files are on my computer?  Or do I need to start the application 
server (the C++ executable program is also a web server) before starting the 
Apache httpd?


[users@httpd] About Using ProxyPass Directive

2019-01-14 Thread Osman Zakir
The application I want to deploy behind the reverse proxy is in the 
E:\programming\visual_studio_2017\Projects\currency_converter\x64\Release 
directory on my computer, and I got a free subdomain from 
https://www.subdomain.com which forwards to my external IP address which I got 
from searching "my ip" in my browser.  The URL for it is 
https://dragonscurrencyconv.com.nu.  Right now it won't get to the app at all 
because although I've set up port forwarding, my app still can't talk to the 
Internet publicly.  I want to try setting up a reverse proxy again.

The front-end JavaScript code in my app sends a GET request to the server code 
I wrote in C++ that asks for the currency API access key so it can use it to 
get the list of currencies.  The path URI for the access key is 
"/?q=accesskey".  I want to configure this on the ProxyPass as well so that 
it'd route to reverse proxy server correctly.  Right now my reverse proxy 
configuration looks like this:

"

Options All​
Options Indexes FollowSymLinks​
AllowOverride None​
Require all granted​
​
​
​
ServerAdmin osmanzaki...@hotmail.com​
ServerName dragonscurrencyconv.com.nu​
ServerAlias www.dragonscurrencyconv.com.nu​
ErrorLog "logs/dragonscurrencyconv.com.nu-error.log"​
CustomLog "logs/dragonscurrencyconv.com.nu-access.log" common​
​
​
ProxyPass "/" 
"E:/programming/visual_studio_2017/Projects/currency_converter/x64/Release"​
ProxyPass "/?q=accesskey"
"

Should I put the same path as for the first ProxyPass directive, for the "/" 
route, for the accesskey route as well, or is that one also wrong?  What would 
the correct one be if so?  My app's source code is all on GitHub, here: 
https://github.com/DragonOsman/currency_converter.  Any help would be 
appreciated.  Thanks in advance.
[https://avatars0.githubusercontent.com/u/18173932?s=400=4]

GitHub - DragonOsman/currency_converter: Application for Computer Science 
course
Google Maps + Currency Converter Web Application. Application for Computer 
Science course. This is a currency converter web application with the frontend 
and a backend.
github.com




[users@httpd] Configuring reverse proxy

2019-01-12 Thread Osman Zakir
I set up port forwarding on my router, so I think I'm ready to try this again.  
But first I want to ask if Apache needs to be able to see my external IP 
address.  Ipconfig and other network applications can't see it.  And my server 
app's executable is being allowed through the firewall currently; is this a 
good idea for when I want to set up a reverse proxy for it, or will it do?


Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-25 Thread Osman Zakir
When you mention the DocumentRoot, do you mean just the setting for vhosts or 
the document root for the reverse proxy?  Are you telling me I don't need a 
 directive if I have a ProxyPass "/" "http://target/; line?

And is it fine to have the ProxyPass defined like this:
ProxyPass "/" 
"E:/programming/visual_studio_2017/Projects/currency_converter/Release/" ?  
That's the path to the directory on my machine.

Is the stuff from line 541 to line 546 not needed?

From: Frank Gingras 
Sent: Tuesday, September 25, 2018 7:08 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

Osman,

Take a step back, you're all over the place. You need to focus on one task at a 
time, else you will never finish configuring your server.

For the vhost, again, if you use ProxyPass / http://target/, then you do *not* 
need set set a DocumentRoot, as every single request will be proxied.

If you proxy a specific URI path, i.e. ProxyPass /foo http://target/bar, then 
do *do* need a DocumentRoot to handle the requests that do not begin with /foo.

For SSL/TLS, determine first if you want httpd to do the termination, or if 
your backend speaks TLS.

On Mon, Sep 24, 2018 at 4:45 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I got a subdomain from freedns.afraid.org<http://freedns.afraid.org> that took 
the IP address of my computer. I tried to use it for my app, but when I 
navigated to the subdomain, it took me to the login page for my router's admin 
settings.  I tried specifying the port number I set on the Apache httpd 
configuration file, but that got me to an error page indicating that the 
browser can't find the site.

I'm attaching httpd.conf again.  I need to know about the PassEnv lines as 
well, actually.  And also the stuff from line 541 downward.

What am I still doing wrong?  Please help.  Thanks.

From: Eric Covener mailto:cove...@gmail.com>>
Sent: Monday, September 24, 2018 7:08 PM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

On Mon, Sep 24, 2018 at 7:30 AM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
>
> The Apache document root and the document root for the reverse proxy should 
> be different, right?

Isn't Apache and the reverse proxy one and the same?

 > And do you mean I need to specify the document root for the reverse
proxy via the  directive?  Or do I just have to have that
somewhere above or below the ProxyPass line?  And if I specify the
reverse proxy document root in ProxyPass, I don't also need to specify
it for the virtual host, right?  As for the port number for the
reverse proxy, I'll try 8000 for now.

The DocumentRoot won't ever be used with your ProxyPass /.
If you later had ProxyPass of some more specific context root, like
/app, then your document root would be used when the request didn't
match the ProxyPass.

The relative position doesn't matter as long as they are in the same context.

> If I have this:
>
> < "E:/programming/visual_studio_2017/Projects/currency_converter/Release">
> 

> What should I put in there?

What do you expect Apache to do with files in there? You've been
talking about a reverse proxy.

-
To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.org<mailto:users-unsubscr...@httpd.apache.org>
For additional commands, e-mail: 
users-h...@httpd.apache.org<mailto:users-h...@httpd.apache.org>


-
To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.org<mailto:users-unsubscr...@httpd.apache.org>
For additional commands, e-mail: 
users-h...@httpd.apache.org<mailto:users-h...@httpd.apache.org>


Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-24 Thread Osman Zakir
I got a subdomain from freedns.afraid.org that took the IP address of my 
computer. I tried to use it for my app, but when I navigated to the subdomain, 
it took me to the login page for my router's admin settings.  I tried 
specifying the port number I set on the Apache httpd configuration file, but 
that got me to an error page indicating that the browser can't find the site.

I'm attaching httpd.conf again.  I need to know about the PassEnv lines as 
well, actually.  And also the stuff from line 541 downward.

What am I still doing wrong?  Please help.  Thanks.

From: Eric Covener 
Sent: Monday, September 24, 2018 7:08 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

On Mon, Sep 24, 2018 at 7:30 AM Osman Zakir  wrote:
>
> The Apache document root and the document root for the reverse proxy should 
> be different, right?

Isn't Apache and the reverse proxy one and the same?

 > And do you mean I need to specify the document root for the reverse
proxy via the  directive?  Or do I just have to have that
somewhere above or below the ProxyPass line?  And if I specify the
reverse proxy document root in ProxyPass, I don't also need to specify
it for the virtual host, right?  As for the port number for the
reverse proxy, I'll try 8000 for now.

The DocumentRoot won't ever be used with your ProxyPass /.
If you later had ProxyPass of some more specific context root, like
/app, then your document root would be used when the request didn't
match the ProxyPass.

The relative position doesn't matter as long as they are in the same context.

> If I have this:
>
> < "E:/programming/visual_studio_2017/Projects/currency_converter/Release">
> 

> What should I put in there?

What do you expect Apache to do with files in there? You've been
talking about a reverse proxy.

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



httpd.conf
Description: httpd.conf

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

Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-24 Thread Osman Zakir
I'm trying to ask if the non-proxied files served by the Apache httpd should be 
in a separate directory compared to the reverse proxied one(s).  Right now 
they're separate since the non-proxied document root is htdocs as in the 
default configuration.  The  directive I've added near by reverse 
proxy configuration lines is meant to be for the directory for the reverse 
proxy.

I just want to have a  directive configuration that would work best 
for the reverse proxy.  I don't know what to do for that, though.  Is it okay 
to just make it the same as the one for the htdocs directory?

I do still need a suggestion for a good subdomain provider where the subdomain 
would take my computer's IP address (and I'll want it to update to the new IP 
address if I switch countries and get a new WiFi router and modem).  It should 
also preferably give me a subdomain with a .com extension, if that's possible.

I also want to know how to switch to HTTPS on Apache.  What part of the 
documentation do I read to find out how to switch to HTTPS for a reverse proxy? 
 I'll do the switch after getting it to work for plain HTTP, of course.  Just 
thought I'd ask now.  And is there an Include line I have to uncomment for the 
SSL stuff to work, or do I have to use a separate configuration for that and 
not httpd.conf itself?  I see a openssl.cnf file in the same directory as 
httpd.conf.

I've attached httpd.conf to this message as well.  Please let me know if it's 
okay so far, aside from the  directive for the reverse proxy which 
is left empty because I'm trying to ask what to put in there.

From: Eric Covener 
Sent: Monday, September 24, 2018 7:08 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

On Mon, Sep 24, 2018 at 7:30 AM Osman Zakir  wrote:
>
> The Apache document root and the document root for the reverse proxy should 
> be different, right?

Isn't Apache and the reverse proxy one and the same?

 > And do you mean I need to specify the document root for the reverse
proxy via the  directive?  Or do I just have to have that
somewhere above or below the ProxyPass line?  And if I specify the
reverse proxy document root in ProxyPass, I don't also need to specify
it for the virtual host, right?  As for the port number for the
reverse proxy, I'll try 8000 for now.

The DocumentRoot won't ever be used with your ProxyPass /.
If you later had ProxyPass of some more specific context root, like
/app, then your document root would be used when the request didn't
match the ProxyPass.

The relative position doesn't matter as long as they are in the same context.

> If I have this:
>
> < "E:/programming/visual_studio_2017/Projects/currency_converter/Release">
> 

> What should I put in there?

What do you expect Apache to do with files in there? You've been
talking about a reverse proxy.

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



httpd.conf
Description: httpd.conf

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

Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-24 Thread Osman Zakir
I'm attaching the httpd.conf file here because I forgot to do so in the 
previous message.  Please let me know if it's fine now.

I need a suggestion for a good place where I can get a free subdomain name, 
preferably one that has a .com extension and which will take my computer's IP 
address.

From: Eric Covener 
Sent: Monday, September 24, 2018 12:17 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?



On Sun, Sep 23, 2018 at 2:09 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I'm talking about the document root of the reverse proxy server.  How do I set 
it?

Use the DocumentRoot directive and a  section that matches, just as 
your defauly configuration surely already had.

And do I have to also run the server that I want to put behind the reverse 
proxy for this to work, or is that not necessary?

The proxy server isn't starting it for you, so yes it's necessary for you to 
start it.


And please also tell me if I have the reverse proxy configuration stuff done 
correctly in the httpd.conf file.  I'm attaching it to this message.


Looks wrong, it is proxying back to port 80.

Along with that, I also want to know how to get a subdomain so I can use that 
and its IP address for my virtual host and ProxyPass settings as needed.  I'll 
get a free subdomain and instead of a top-level domain if that's okay for this.

Find a provider of free subdomain DNS.  Determine your computers IP address.  
Fill out the free providers form and associate the two.

What I'm doing is having the Apache httpd listen on port 80 while I have the 
server I want to put behind the reverse proxy listen on port 8080.  When I 
tried to put both on the same port, and tried to run the server I'm trying to 
proxy, I got an error on that server saying that I'm trying to access a port I 
have no permission to access.

Generally you'll need to pick different ports.



httpd.conf
Description: httpd.conf

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

Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-24 Thread Osman Zakir
The Apache document root and the document root for the reverse proxy should be 
different, right?  And do you mean I need to specify the document root for the 
reverse proxy via the  directive?  Or do I just have to have that 
somewhere above or below the ProxyPass line?  And if I specify the reverse 
proxy document root in ProxyPass, I don't also need to specify it for the 
virtual host, right?  As for the port number for the reverse proxy, I'll try 
8000 for now.

If I have this:

<
​


What should I put in there?

From: Eric Covener 
Sent: Monday, September 24, 2018 12:17 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?



On Sun, Sep 23, 2018 at 2:09 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I'm talking about the document root of the reverse proxy server.  How do I set 
it?

Use the DocumentRoot directive and a  section that matches, just as 
your defauly configuration surely already had.

And do I have to also run the server that I want to put behind the reverse 
proxy for this to work, or is that not necessary?

The proxy server isn't starting it for you, so yes it's necessary for you to 
start it.


And please also tell me if I have the reverse proxy configuration stuff done 
correctly in the httpd.conf file.  I'm attaching it to this message.


Looks wrong, it is proxying back to port 80.

Along with that, I also want to know how to get a subdomain so I can use that 
and its IP address for my virtual host and ProxyPass settings as needed.  I'll 
get a free subdomain and instead of a top-level domain if that's okay for this.

Find a provider of free subdomain DNS.  Determine your computers IP address.  
Fill out the free providers form and associate the two.

What I'm doing is having the Apache httpd listen on port 80 while I have the 
server I want to put behind the reverse proxy listen on port 8080.  When I 
tried to put both on the same port, and tried to run the server I'm trying to 
proxy, I got an error on that server saying that I'm trying to access a port I 
have no permission to access.

Generally you'll need to pick different ports.



Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-23 Thread Osman Zakir
I'm talking about the document root of the reverse proxy server.  How do I set 
it?

And do I have to also run the server that I want to put behind the reverse 
proxy for this to work, or is that not necessary?  And please also tell me if I 
have the reverse proxy configuration stuff done correctly in the httpd.conf 
file.  I'm attaching it to this message.  Along with that, I also want to know 
how to get a subdomain so I can use that and its IP address for my virtual host 
and ProxyPass settings as needed.  I'll get a free subdomain and instead of a 
top-level domain if that's okay for this.

What I'm doing is having the Apache httpd listen on port 80 while I have the 
server I want to put behind the reverse proxy listen on port 8080.  When I 
tried to put both on the same port, and tried to run the server I'm trying to 
proxy, I got an error on that server saying that I'm trying to access a port I 
have no permission to access.

Any help would be appreciated.  Thanks in advance.

From: Eric Covener 
Sent: Sunday, September 23, 2018 10:56 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?



On Sun, Sep 23, 2018, 10:55 AM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I'm sorry to keep bothering you about this, but would you please answer my 
questions?  How do I fix the problem of the 503 error,

Read the logs on both sides to determine the problem.


and how do I specify the address in the filesystem for the files I want to 
serve with the reverse proxy server?

Filesystems don't have addresses, and reverse proxies don't usually work out of 
the filesystem at all. You will have to be more specific.




From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 6:38 AM

To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

You can define a IP vhost too if you like. It doesn't matter.

And yes, read the official documentation about vhosts, as linked before.

On Fri, Sep 21, 2018 at 7:21 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Is that for IP-based virtual hosts?

And will free subdomain work for this when I go ahead and try to use a DNS to 
reach my server after I've gotten this to work?  Just want to ask this first, 
just in case.

I can read about how to define a front-facing vhost in the examples and 
documentation, right?

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 4:07 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

In a nutshell, you need to:

1) Define a front-facing vhost. You can use DNS and name-based vhosts to reach 
it
2) Decide what URI path you want to proxy in that vhost
3) If you proxy / (i.e. every request), then you don't need a DocumentRoot in 
that vhost. Otherwise, you need one
4) You don't need to use DNS to specify the target of your backend server. 
ProxyPass / http://IP_HERE:PORT/ is perfectly fine.
5) I actually recommend that you do not use DNS to reach the proxied server, 
initially. Keep things simple first.

On Fri, Sep 21, 2018 at 6:30 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Let me just say again, first, that I have a subdomain name I want to use for my 
app.

Okay.  Anyway, when I tried to get to my app just now after starting the Apache 
httpd as a service, I got an error page in Edge saying that it can't reach the 
page.  I'd like to show you my httpd configuration file again to make sure if I 
have the reverse proxy configuration done correctly.

I want to know the IP address so I can use it in my hosts file, since you said 
I can add an entry to the hosts file mapping that IP address to a given name 
domain name (or subdomain name in my case).  Though I'm not sure if doing it 
like that would make the app publicly available from anywhere.

What happens if I set up an IP-based virtual host instead?  And how easy or 
hard would it be to map a domain or subdomain name to that IP address?

Another question: the current file path I have for my virtual host DocumentRoot 
setting is the one my app's files are in.  Should I set it to the htdocs folder 
instead (if so, how do I tell it that it what files it has to serve behind a 
reverse proxy?)?


From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 3:02 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

The IP httpd will use to proxy to your backend isn't typically relevant, unless 
you want to apply filtering or tracking of some sort.

Can you start over and tell us what problem you're trying to solve, again?

On Fri, Sep 21, 2018 at 5:53 P

Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-23 Thread Osman Zakir
I'm sorry to keep bothering you about this, but would you please answer my 
questions?  How do I fix the problem of the 503 error, and how do I specify the 
address in the filesystem for the files I want to serve with the reverse proxy 
server?


From: Frank Gingras 
Sent: Saturday, September 22, 2018 6:38 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

You can define a IP vhost too if you like. It doesn't matter.

And yes, read the official documentation about vhosts, as linked before.

On Fri, Sep 21, 2018 at 7:21 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Is that for IP-based virtual hosts?

And will free subdomain work for this when I go ahead and try to use a DNS to 
reach my server after I've gotten this to work?  Just want to ask this first, 
just in case.

I can read about how to define a front-facing vhost in the examples and 
documentation, right?

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 4:07 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

In a nutshell, you need to:

1) Define a front-facing vhost. You can use DNS and name-based vhosts to reach 
it
2) Decide what URI path you want to proxy in that vhost
3) If you proxy / (i.e. every request), then you don't need a DocumentRoot in 
that vhost. Otherwise, you need one
4) You don't need to use DNS to specify the target of your backend server. 
ProxyPass / http://IP_HERE:PORT/ is perfectly fine.
5) I actually recommend that you do not use DNS to reach the proxied server, 
initially. Keep things simple first.

On Fri, Sep 21, 2018 at 6:30 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Let me just say again, first, that I have a subdomain name I want to use for my 
app.

Okay.  Anyway, when I tried to get to my app just now after starting the Apache 
httpd as a service, I got an error page in Edge saying that it can't reach the 
page.  I'd like to show you my httpd configuration file again to make sure if I 
have the reverse proxy configuration done correctly.

I want to know the IP address so I can use it in my hosts file, since you said 
I can add an entry to the hosts file mapping that IP address to a given name 
domain name (or subdomain name in my case).  Though I'm not sure if doing it 
like that would make the app publicly available from anywhere.

What happens if I set up an IP-based virtual host instead?  And how easy or 
hard would it be to map a domain or subdomain name to that IP address?

Another question: the current file path I have for my virtual host DocumentRoot 
setting is the one my app's files are in.  Should I set it to the htdocs folder 
instead (if so, how do I tell it that it what files it has to serve behind a 
reverse proxy?)?


From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 3:02 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

The IP httpd will use to proxy to your backend isn't typically relevant, unless 
you want to apply filtering or tracking of some sort.

Can you start over and tell us what problem you're trying to solve, again?

On Fri, Sep 21, 2018 at 5:53 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I've already read about networking and DNS to some extent.  I'll read about 
them some more, though.

But I still think I should know how to find the IP address used by the Apache 
reverse proxy server.  Just in case.

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 2:47 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

Osman,

Starting another thread to ask the same question is a bit ill-advised. I would 
still recommend that you get up to speed on networking and DNS basics, first.

Next, you should read the following docs:

http://wiki.apache.org/httpd/ExampleVhosts
http://httpd.apache.org/docs/current/vhosts/examples.html
http://httpd.apache.org/docs/current/mod/mpm_common.html#listen
http://httpd.apache.org/docs/current/vhosts/name-based.html



On Fri, Sep 21, 2018 at 10:41 AM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
How do I find the IP address?

Would it be possible to use that IP address with a subdomain name on a virtual 
host configuration?  I want to use the free subdomain I got from 
http://www.subdomain.net.
Subdomain.net - the largest free subdomain network<http://www.subdomain.net/>
Subdomain.net offers you a free subdomain for your website.
www.subdomain.net<http://www.subdomain.net>



-

Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-22 Thread Osman Zakir
I edited the httpd.conf file to change the Listen directive value to 0.0.0.0:80 
and also changed the value of the ProxyPass IP and port to that.  But when I 
tried to go to localhost after starting the Apache httpd, I got a 503 error on 
the browser.  Do I have to also run the app server that I wrote, itself?  
Because the same thing happens even with that.

From: Frank Gingras 
Sent: Saturday, September 22, 2018 6:38 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

You can define a IP vhost too if you like. It doesn't matter.

And yes, read the official documentation about vhosts, as linked before.

On Fri, Sep 21, 2018 at 7:21 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Is that for IP-based virtual hosts?

And will free subdomain work for this when I go ahead and try to use a DNS to 
reach my server after I've gotten this to work?  Just want to ask this first, 
just in case.

I can read about how to define a front-facing vhost in the examples and 
documentation, right?

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 4:07 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

In a nutshell, you need to:

1) Define a front-facing vhost. You can use DNS and name-based vhosts to reach 
it
2) Decide what URI path you want to proxy in that vhost
3) If you proxy / (i.e. every request), then you don't need a DocumentRoot in 
that vhost. Otherwise, you need one
4) You don't need to use DNS to specify the target of your backend server. 
ProxyPass / http://IP_HERE:PORT/ is perfectly fine.
5) I actually recommend that you do not use DNS to reach the proxied server, 
initially. Keep things simple first.

On Fri, Sep 21, 2018 at 6:30 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Let me just say again, first, that I have a subdomain name I want to use for my 
app.

Okay.  Anyway, when I tried to get to my app just now after starting the Apache 
httpd as a service, I got an error page in Edge saying that it can't reach the 
page.  I'd like to show you my httpd configuration file again to make sure if I 
have the reverse proxy configuration done correctly.

I want to know the IP address so I can use it in my hosts file, since you said 
I can add an entry to the hosts file mapping that IP address to a given name 
domain name (or subdomain name in my case).  Though I'm not sure if doing it 
like that would make the app publicly available from anywhere.

What happens if I set up an IP-based virtual host instead?  And how easy or 
hard would it be to map a domain or subdomain name to that IP address?

Another question: the current file path I have for my virtual host DocumentRoot 
setting is the one my app's files are in.  Should I set it to the htdocs folder 
instead (if so, how do I tell it that it what files it has to serve behind a 
reverse proxy?)?


From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 3:02 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

The IP httpd will use to proxy to your backend isn't typically relevant, unless 
you want to apply filtering or tracking of some sort.

Can you start over and tell us what problem you're trying to solve, again?

On Fri, Sep 21, 2018 at 5:53 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I've already read about networking and DNS to some extent.  I'll read about 
them some more, though.

But I still think I should know how to find the IP address used by the Apache 
reverse proxy server.  Just in case.

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 2:47 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

Osman,

Starting another thread to ask the same question is a bit ill-advised. I would 
still recommend that you get up to speed on networking and DNS basics, first.

Next, you should read the following docs:

http://wiki.apache.org/httpd/ExampleVhosts
http://httpd.apache.org/docs/current/vhosts/examples.html
http://httpd.apache.org/docs/current/mod/mpm_common.html#listen
http://httpd.apache.org/docs/current/vhosts/name-based.html



On Fri, Sep 21, 2018 at 10:41 AM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
How do I find the IP address?

Would it be possible to use that IP address with a subdomain name on a virtual 
host configuration?  I want to use the free subdomain I got from 
http://www.subdomain.net.
Subdomain.net - the largest free subdomain network<http://www.subdomain.net/>
Subdomain.net offers you a free subd

Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-22 Thread Osman Zakir
The files I want to serve are the ones in the DocumentRoot I currently have for 
my vhost configuration 
(E:\programming\visual_studio_2017\Projects\currency_converter\Release).  Do I 
need to specify as Apache's document root?  The files in this directory are:

\scripts
scripts.js
\styles
styles.css
index.html
currency_converter.exe
currency_converter.iobj
currency_converter.ipdb
currency_converter.pdb



From: Frank Gingras 
Sent: Saturday, September 22, 2018 6:38 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

You can define a IP vhost too if you like. It doesn't matter.

And yes, read the official documentation about vhosts, as linked before.

On Fri, Sep 21, 2018 at 7:21 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Is that for IP-based virtual hosts?

And will free subdomain work for this when I go ahead and try to use a DNS to 
reach my server after I've gotten this to work?  Just want to ask this first, 
just in case.

I can read about how to define a front-facing vhost in the examples and 
documentation, right?

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 4:07 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

In a nutshell, you need to:

1) Define a front-facing vhost. You can use DNS and name-based vhosts to reach 
it
2) Decide what URI path you want to proxy in that vhost
3) If you proxy / (i.e. every request), then you don't need a DocumentRoot in 
that vhost. Otherwise, you need one
4) You don't need to use DNS to specify the target of your backend server. 
ProxyPass / http://IP_HERE:PORT/ is perfectly fine.
5) I actually recommend that you do not use DNS to reach the proxied server, 
initially. Keep things simple first.

On Fri, Sep 21, 2018 at 6:30 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Let me just say again, first, that I have a subdomain name I want to use for my 
app.

Okay.  Anyway, when I tried to get to my app just now after starting the Apache 
httpd as a service, I got an error page in Edge saying that it can't reach the 
page.  I'd like to show you my httpd configuration file again to make sure if I 
have the reverse proxy configuration done correctly.

I want to know the IP address so I can use it in my hosts file, since you said 
I can add an entry to the hosts file mapping that IP address to a given name 
domain name (or subdomain name in my case).  Though I'm not sure if doing it 
like that would make the app publicly available from anywhere.

What happens if I set up an IP-based virtual host instead?  And how easy or 
hard would it be to map a domain or subdomain name to that IP address?

Another question: the current file path I have for my virtual host DocumentRoot 
setting is the one my app's files are in.  Should I set it to the htdocs folder 
instead (if so, how do I tell it that it what files it has to serve behind a 
reverse proxy?)?


From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 3:02 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

The IP httpd will use to proxy to your backend isn't typically relevant, unless 
you want to apply filtering or tracking of some sort.

Can you start over and tell us what problem you're trying to solve, again?

On Fri, Sep 21, 2018 at 5:53 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I've already read about networking and DNS to some extent.  I'll read about 
them some more, though.

But I still think I should know how to find the IP address used by the Apache 
reverse proxy server.  Just in case.

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 2:47 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

Osman,

Starting another thread to ask the same question is a bit ill-advised. I would 
still recommend that you get up to speed on networking and DNS basics, first.

Next, you should read the following docs:

http://wiki.apache.org/httpd/ExampleVhosts
http://httpd.apache.org/docs/current/vhosts/examples.html
http://httpd.apache.org/docs/current/mod/mpm_common.html#listen
http://httpd.apache.org/docs/current/vhosts/name-based.html



On Fri, Sep 21, 2018 at 10:41 AM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
How do I find the IP address?

Would it be possible to use that IP address with a subdomain name on a virtual 
host configuration?  I want to use the free subdomain I got from 
http://www.subdomain.net.
Subdomain.net - the largest free subdomain network<http://www.subdomain.net/>
Subdomain.net of

Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-22 Thread Osman Zakir
What I mainly want to know right now is how to define a front-facing vhost (an 
IP-based one, for now).  I hope I can find that in the documentation.  I'll ask 
if I get confused about something.

From: Frank Gingras 
Sent: Saturday, September 22, 2018 6:38 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

You can define a IP vhost too if you like. It doesn't matter.

And yes, read the official documentation about vhosts, as linked before.

On Fri, Sep 21, 2018 at 7:21 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Is that for IP-based virtual hosts?

And will free subdomain work for this when I go ahead and try to use a DNS to 
reach my server after I've gotten this to work?  Just want to ask this first, 
just in case.

I can read about how to define a front-facing vhost in the examples and 
documentation, right?

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 4:07 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

In a nutshell, you need to:

1) Define a front-facing vhost. You can use DNS and name-based vhosts to reach 
it
2) Decide what URI path you want to proxy in that vhost
3) If you proxy / (i.e. every request), then you don't need a DocumentRoot in 
that vhost. Otherwise, you need one
4) You don't need to use DNS to specify the target of your backend server. 
ProxyPass / http://IP_HERE:PORT/ is perfectly fine.
5) I actually recommend that you do not use DNS to reach the proxied server, 
initially. Keep things simple first.

On Fri, Sep 21, 2018 at 6:30 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Let me just say again, first, that I have a subdomain name I want to use for my 
app.

Okay.  Anyway, when I tried to get to my app just now after starting the Apache 
httpd as a service, I got an error page in Edge saying that it can't reach the 
page.  I'd like to show you my httpd configuration file again to make sure if I 
have the reverse proxy configuration done correctly.

I want to know the IP address so I can use it in my hosts file, since you said 
I can add an entry to the hosts file mapping that IP address to a given name 
domain name (or subdomain name in my case).  Though I'm not sure if doing it 
like that would make the app publicly available from anywhere.

What happens if I set up an IP-based virtual host instead?  And how easy or 
hard would it be to map a domain or subdomain name to that IP address?

Another question: the current file path I have for my virtual host DocumentRoot 
setting is the one my app's files are in.  Should I set it to the htdocs folder 
instead (if so, how do I tell it that it what files it has to serve behind a 
reverse proxy?)?


From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 3:02 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

The IP httpd will use to proxy to your backend isn't typically relevant, unless 
you want to apply filtering or tracking of some sort.

Can you start over and tell us what problem you're trying to solve, again?

On Fri, Sep 21, 2018 at 5:53 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I've already read about networking and DNS to some extent.  I'll read about 
them some more, though.

But I still think I should know how to find the IP address used by the Apache 
reverse proxy server.  Just in case.

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 2:47 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

Osman,

Starting another thread to ask the same question is a bit ill-advised. I would 
still recommend that you get up to speed on networking and DNS basics, first.

Next, you should read the following docs:

http://wiki.apache.org/httpd/ExampleVhosts
http://httpd.apache.org/docs/current/vhosts/examples.html
http://httpd.apache.org/docs/current/mod/mpm_common.html#listen
http://httpd.apache.org/docs/current/vhosts/name-based.html



On Fri, Sep 21, 2018 at 10:41 AM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
How do I find the IP address?

Would it be possible to use that IP address with a subdomain name on a virtual 
host configuration?  I want to use the free subdomain I got from 
http://www.subdomain.net.
Subdomain.net - the largest free subdomain network<http://www.subdomain.net/>
Subdomain.net offers you a free subdomain for your website.
www.subdomain.net<http://www.subdomain.net>



-
To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.o

Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-21 Thread Osman Zakir
Is that for IP-based virtual hosts?

And will free subdomain work for this when I go ahead and try to use a DNS to 
reach my server after I've gotten this to work?  Just want to ask this first, 
just in case.

I can read about how to define a front-facing vhost in the examples and 
documentation, right?

From: Frank Gingras 
Sent: Saturday, September 22, 2018 4:07 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

In a nutshell, you need to:

1) Define a front-facing vhost. You can use DNS and name-based vhosts to reach 
it
2) Decide what URI path you want to proxy in that vhost
3) If you proxy / (i.e. every request), then you don't need a DocumentRoot in 
that vhost. Otherwise, you need one
4) You don't need to use DNS to specify the target of your backend server. 
ProxyPass / http://IP_HERE:PORT/ is perfectly fine.
5) I actually recommend that you do not use DNS to reach the proxied server, 
initially. Keep things simple first.

On Fri, Sep 21, 2018 at 6:30 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
Let me just say again, first, that I have a subdomain name I want to use for my 
app.

Okay.  Anyway, when I tried to get to my app just now after starting the Apache 
httpd as a service, I got an error page in Edge saying that it can't reach the 
page.  I'd like to show you my httpd configuration file again to make sure if I 
have the reverse proxy configuration done correctly.

I want to know the IP address so I can use it in my hosts file, since you said 
I can add an entry to the hosts file mapping that IP address to a given name 
domain name (or subdomain name in my case).  Though I'm not sure if doing it 
like that would make the app publicly available from anywhere.

What happens if I set up an IP-based virtual host instead?  And how easy or 
hard would it be to map a domain or subdomain name to that IP address?

Another question: the current file path I have for my virtual host DocumentRoot 
setting is the one my app's files are in.  Should I set it to the htdocs folder 
instead (if so, how do I tell it that it what files it has to serve behind a 
reverse proxy?)?


From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 3:02 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

The IP httpd will use to proxy to your backend isn't typically relevant, unless 
you want to apply filtering or tracking of some sort.

Can you start over and tell us what problem you're trying to solve, again?

On Fri, Sep 21, 2018 at 5:53 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I've already read about networking and DNS to some extent.  I'll read about 
them some more, though.

But I still think I should know how to find the IP address used by the Apache 
reverse proxy server.  Just in case.

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 2:47 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

Osman,

Starting another thread to ask the same question is a bit ill-advised. I would 
still recommend that you get up to speed on networking and DNS basics, first.

Next, you should read the following docs:

http://wiki.apache.org/httpd/ExampleVhosts
http://httpd.apache.org/docs/current/vhosts/examples.html
http://httpd.apache.org/docs/current/mod/mpm_common.html#listen
http://httpd.apache.org/docs/current/vhosts/name-based.html



On Fri, Sep 21, 2018 at 10:41 AM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
How do I find the IP address?

Would it be possible to use that IP address with a subdomain name on a virtual 
host configuration?  I want to use the free subdomain I got from 
http://www.subdomain.net.
Subdomain.net - the largest free subdomain network<http://www.subdomain.net/>
Subdomain.net offers you a free subdomain for your website.
www.subdomain.net<http://www.subdomain.net>



-
To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.org<mailto:users-unsubscr...@httpd.apache.org>
For additional commands, e-mail: 
users-h...@httpd.apache.org<mailto:users-h...@httpd.apache.org>


Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-21 Thread Osman Zakir
Let me just say again, first, that I have a subdomain name I want to use for my 
app.

Okay.  Anyway, when I tried to get to my app just now after starting the Apache 
httpd as a service, I got an error page in Edge saying that it can't reach the 
page.  I'd like to show you my httpd configuration file again to make sure if I 
have the reverse proxy configuration done correctly.

I want to know the IP address so I can use it in my hosts file, since you said 
I can add an entry to the hosts file mapping that IP address to a given name 
domain name (or subdomain name in my case).  Though I'm not sure if doing it 
like that would make the app publicly available from anywhere.

What happens if I set up an IP-based virtual host instead?  And how easy or 
hard would it be to map a domain or subdomain name to that IP address?

Another question: the current file path I have for my virtual host DocumentRoot 
setting is the one my app's files are in.  Should I set it to the htdocs folder 
instead (if so, how do I tell it that it what files it has to serve behind a 
reverse proxy?)?


From: Frank Gingras 
Sent: Saturday, September 22, 2018 3:02 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

The IP httpd will use to proxy to your backend isn't typically relevant, unless 
you want to apply filtering or tracking of some sort.

Can you start over and tell us what problem you're trying to solve, again?

On Fri, Sep 21, 2018 at 5:53 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I've already read about networking and DNS to some extent.  I'll read about 
them some more, though.

But I still think I should know how to find the IP address used by the Apache 
reverse proxy server.  Just in case.

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Saturday, September 22, 2018 2:47 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

Osman,

Starting another thread to ask the same question is a bit ill-advised. I would 
still recommend that you get up to speed on networking and DNS basics, first.

Next, you should read the following docs:

http://wiki.apache.org/httpd/ExampleVhosts
http://httpd.apache.org/docs/current/vhosts/examples.html
http://httpd.apache.org/docs/current/mod/mpm_common.html#listen
http://httpd.apache.org/docs/current/vhosts/name-based.html



On Fri, Sep 21, 2018 at 10:41 AM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
How do I find the IP address?

Would it be possible to use that IP address with a subdomain name on a virtual 
host configuration?  I want to use the free subdomain I got from 
http://www.subdomain.net.
Subdomain.net - the largest free subdomain network<http://www.subdomain.net/>
Subdomain.net offers you a free subdomain for your website.
www.subdomain.net<http://www.subdomain.net>




httpd.conf
Description: httpd.conf

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

Re: [users@httpd] IP address used by Apache reverse proxy?

2018-09-21 Thread Osman Zakir
I've already read about networking and DNS to some extent.  I'll read about 
them some more, though.

But I still think I should know how to find the IP address used by the Apache 
reverse proxy server.  Just in case.

From: Frank Gingras 
Sent: Saturday, September 22, 2018 2:47 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?

Osman,

Starting another thread to ask the same question is a bit ill-advised. I would 
still recommend that you get up to speed on networking and DNS basics, first.

Next, you should read the following docs:

http://wiki.apache.org/httpd/ExampleVhosts
http://httpd.apache.org/docs/current/vhosts/examples.html
http://httpd.apache.org/docs/current/mod/mpm_common.html#listen
http://httpd.apache.org/docs/current/vhosts/name-based.html



On Fri, Sep 21, 2018 at 10:41 AM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
How do I find the IP address?

Would it be possible to use that IP address with a subdomain name on a virtual 
host configuration?  I want to use the free subdomain I got from 
http://www.subdomain.net.
Subdomain.net - the largest free subdomain network<http://www.subdomain.net/>
Subdomain.net offers you a free subdomain for your website.
www.subdomain.net<http://www.subdomain.net>




[users@httpd] IP address used by Apache reverse proxy?

2018-09-21 Thread Osman Zakir
How do I find the IP address?

Would it be possible to use that IP address with a subdomain name on a virtual 
host configuration?  I want to use the free subdomain I got from 
http://www.subdomain.net.
Subdomain.net - the largest free subdomain network
Subdomain.net offers you a free subdomain for your website.
www.subdomain.net




Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

2018-09-20 Thread Osman Zakir
If I'm using a reverse proxy, do I need the IP address of the reverse proxy 
server?  And if so, how do I get the IP address of the reverse proxy server (if 
you don't want to tell, please point me to a resource I read about it on)?  I 
got a free subdomain name from subdomain.net.  So do I put Apache's IP address 
(if I can find it) in for IP used by the host name in my hosts file?

From: Eric Covener 
Sent: Thursday, September 20, 2018 9:20 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

On Thu, Sep 20, 2018 at 10:57 AM Osman Zakir  wrote:
>
> I haven't changed what I'm saying my problem is that much.  I'm probably 
> having a hard time explaining it.
>
> The host name seems to be the main problem, though, aside from the 
> environment variables.  I don't have a host name.  I'd prefer it if I could 
> get a free subdomain and get my server to take it (without having to pay any 
> money if possible).

The server doesn't "take" a hostname. If you have a domain, you need
to setup the DNS outside of the webserver to point to the right IP
address. Or, mock it up on your workstation with your local host file.

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



Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

2018-09-20 Thread Osman Zakir
I haven't changed what I'm saying my problem is that much.  I'm probably having 
a hard time explaining it.

The host name seems to be the main problem, though, aside from the environment 
variables.  I don't have a host name.  I'd prefer it if I could get a free 
subdomain and get my server to take it (without having to pay any money if 
possible).

Previously, I hadn't added any values to the PassEnv directives in httpd.conf; 
I just added those recently.  Do I need to put double-quotes around the values, 
or is it without double-quotes?

From: Frank Gingras 
Sent: Thursday, September 20, 2018 6:05 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

I'm afraid that you're not capable of formulating a coherent question or 
problem. As such, I'm probably going to lose interest in this thread.

On Wed, Sep 19, 2018 at 8:24 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I went to the app with the reverse proxy but the Google Map didn't display.

I read about DNS, but my problem is just how to get my server app to take the 
subdomain I want it to take.  I get the feeling that I need to find a place 
where I can put the server application so that it'll take the domain name.  But 
there aren't any web hosts that would accept an actual web server app aside 
from a VPS.  I could use a CGI script, but I'll have to change my app and I 
don't even know how I can make the current HTML file I have work with a CGI 
script (also, can a CGI script take environment variables?)?



From: Frank Gingras mailto:thu...@apache.org>>
Sent: Thursday, September 20, 2018 5:15 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

The first step would be to provide useful troubleshooting information. Use curl 
on the server. Read about networking and DNS, in general.

As for the environment variables, proxying shouldn't affect those. Can you 
describe the issue you have with those, in detail?

On Wed, Sep 19, 2018 at 7:24 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I tried to navigate to the app with the virtual host URL on MS Edge and got 
"Hmm...We can't reach this page".  I don't know how to map a domain or 
subdomain to my server app, either.

And I need to know how to get the environment variables to work with Apache's 
reverse proxy.  Again: the environment variables are in the C++ server 
application to begin with and the frontend needs to get them so it request for 
them.  The app works perfectly on localhost, so I just need to deploy it.

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Thursday, September 20, 2018 4:14 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

It would be better if you explained your current problem better instead of 
using expressions like "doesn't seem to be working correctly".

As for the testing, you can use curl on the server itself to see if httpd can 
reach the backend.

On Mon, Sep 17, 2018 at 2:38 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:

I already figured I'd have to keep Apache running at all times.


I'd like it if you guys were to read my httpd.conf and the virtual host 
configuration file to see if I did it correctly.  I did read the documentation 
for it, but I'm not sure if I did correctly and the virtual host also doesn't 
seem to be working correctly (I tried to navigate to the site after starting 
Apache httpd as a service, but it didn't work; how do I correctly navigate to a 
proxied app on Apache?).


Thanks in advance.


From: Frank Gingras mailto:thu...@apache.org>>
Sent: Sunday, September 9, 2018 8:17:34 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

See http://httpd.apache.org/docs/2.4/howto/reverse_proxy.html and 
http://www.apachetutor.org/admin/reverseproxies.

You do need to have a httpd instance running at all times; how else do you 
think it will serve requests?

Lastly, your comment about the documentation is a bit odd - perhaps you could 
offer constructive comments on specific sections instead, so that we could work 
on improving it. A lot of folks dedicated a lot of time writing it, and even 
more would benefit from improvements.

On Thu, Sep 6, 2018 at 7:42 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:

I have a web application I want to deploy behind a reverse proxy.


Do I have to do this on my own computer with the instance of the Apache HTTP 
Server that I've installed on my machine, or is it possible to do this on the 
Apache somehow as well?  If possible, I'd like to do the latter because I'd 
pref

Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

2018-09-19 Thread Osman Zakir
I went to the app with the reverse proxy but the Google Map didn't display.

I read about DNS, but my problem is just how to get my server app to take the 
subdomain I want it to take.  I get the feeling that I need to find a place 
where I can put the server application so that it'll take the domain name.  But 
there aren't any web hosts that would accept an actual web server app aside 
from a VPS.  I could use a CGI script, but I'll have to change my app and I 
don't even know how I can make the current HTML file I have work with a CGI 
script (also, can a CGI script take environment variables?)?



From: Frank Gingras 
Sent: Thursday, September 20, 2018 5:15 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

The first step would be to provide useful troubleshooting information. Use curl 
on the server. Read about networking and DNS, in general.

As for the environment variables, proxying shouldn't affect those. Can you 
describe the issue you have with those, in detail?

On Wed, Sep 19, 2018 at 7:24 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:
I tried to navigate to the app with the virtual host URL on MS Edge and got 
"Hmm...We can't reach this page".  I don't know how to map a domain or 
subdomain to my server app, either.

And I need to know how to get the environment variables to work with Apache's 
reverse proxy.  Again: the environment variables are in the C++ server 
application to begin with and the frontend needs to get them so it request for 
them.  The app works perfectly on localhost, so I just need to deploy it.

From: Frank Gingras mailto:thu...@apache.org>>
Sent: Thursday, September 20, 2018 4:14 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

It would be better if you explained your current problem better instead of 
using expressions like "doesn't seem to be working correctly".

As for the testing, you can use curl on the server itself to see if httpd can 
reach the backend.

On Mon, Sep 17, 2018 at 2:38 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:

I already figured I'd have to keep Apache running at all times.


I'd like it if you guys were to read my httpd.conf and the virtual host 
configuration file to see if I did it correctly.  I did read the documentation 
for it, but I'm not sure if I did correctly and the virtual host also doesn't 
seem to be working correctly (I tried to navigate to the site after starting 
Apache httpd as a service, but it didn't work; how do I correctly navigate to a 
proxied app on Apache?).


Thanks in advance.


From: Frank Gingras mailto:thu...@apache.org>>
Sent: Sunday, September 9, 2018 8:17:34 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

See http://httpd.apache.org/docs/2.4/howto/reverse_proxy.html and 
http://www.apachetutor.org/admin/reverseproxies.

You do need to have a httpd instance running at all times; how else do you 
think it will serve requests?

Lastly, your comment about the documentation is a bit odd - perhaps you could 
offer constructive comments on specific sections instead, so that we could work 
on improving it. A lot of folks dedicated a lot of time writing it, and even 
more would benefit from improvements.

On Thu, Sep 6, 2018 at 7:42 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:

I have a web application I want to deploy behind a reverse proxy.


Do I have to do this on my own computer with the instance of the Apache HTTP 
Server that I've installed on my machine, or is it possible to do this on the 
Apache somehow as well?  If possible, I'd like to do the latter because I'd 
prefer not having to always keep my computer on.


The reason I want a reverse proxy is because my application has its own httpd( 
written in C++).  I'd like the application to be publicly available on the 
Internet.


If I set up a virtual host with Apache (with a public IP, one that isn't 
127.0.0.1, and one I can navigate to from anywhere), will that make the 
application publicly available as I intend?


I'll also need help on setting up virtual hosts and a reverse proxy since the 
Apache documentation is too technical for me (I did try reading it).

-
To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.org<mailto:users-unsubscr...@httpd.apache.org>
For additional commands, e-mail: 
users-h...@httpd.apache.org<mailto:users-h...@httpd.apache.org>


Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

2018-09-19 Thread Osman Zakir
I tried to navigate to the app with the virtual host URL on MS Edge and got 
"Hmm...We can't reach this page".  I don't know how to map a domain or 
subdomain to my server app, either.

And I need to know how to get the environment variables to work with Apache's 
reverse proxy.  Again: the environment variables are in the C++ server 
application to begin with and the frontend needs to get them so it request for 
them.  The app works perfectly on localhost, so I just need to deploy it.

From: Frank Gingras 
Sent: Thursday, September 20, 2018 4:14 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

It would be better if you explained your current problem better instead of 
using expressions like "doesn't seem to be working correctly".

As for the testing, you can use curl on the server itself to see if httpd can 
reach the backend.

On Mon, Sep 17, 2018 at 2:38 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:

I already figured I'd have to keep Apache running at all times.


I'd like it if you guys were to read my httpd.conf and the virtual host 
configuration file to see if I did it correctly.  I did read the documentation 
for it, but I'm not sure if I did correctly and the virtual host also doesn't 
seem to be working correctly (I tried to navigate to the site after starting 
Apache httpd as a service, but it didn't work; how do I correctly navigate to a 
proxied app on Apache?).


Thanks in advance.


From: Frank Gingras mailto:thu...@apache.org>>
Sent: Sunday, September 9, 2018 8:17:34 AM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

See http://httpd.apache.org/docs/2.4/howto/reverse_proxy.html and 
http://www.apachetutor.org/admin/reverseproxies.

You do need to have a httpd instance running at all times; how else do you 
think it will serve requests?

Lastly, your comment about the documentation is a bit odd - perhaps you could 
offer constructive comments on specific sections instead, so that we could work 
on improving it. A lot of folks dedicated a lot of time writing it, and even 
more would benefit from improvements.

On Thu, Sep 6, 2018 at 7:42 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:

I have a web application I want to deploy behind a reverse proxy.


Do I have to do this on my own computer with the instance of the Apache HTTP 
Server that I've installed on my machine, or is it possible to do this on the 
Apache somehow as well?  If possible, I'd like to do the latter because I'd 
prefer not having to always keep my computer on.


The reason I want a reverse proxy is because my application has its own httpd( 
written in C++).  I'd like the application to be publicly available on the 
Internet.


If I set up a virtual host with Apache (with a public IP, one that isn't 
127.0.0.1, and one I can navigate to from anywhere), will that make the 
application publicly available as I intend?


I'll also need help on setting up virtual hosts and a reverse proxy since the 
Apache documentation is too technical for me (I did try reading it).

-
To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.org<mailto:users-unsubscr...@httpd.apache.org>
For additional commands, e-mail: 
users-h...@httpd.apache.org<mailto:users-h...@httpd.apache.org>


Re: [users@httpd] Reverse Proxy and Virtual Host

2018-09-19 Thread Osman Zakir
I need a host to map it to.

As for the path; do I not need the ones for the Access Key and API Key?

From: Eric Covener 
Sent: Wednesday, September 19, 2018 7:43 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Reverse Proxy and Virtual Host

On Wed, Sep 19, 2018 at 10:35 AM Osman Zakir  wrote:
>
> Hi again.
>
> I'm attaching my httpd.conf file here; please read it and tell me if I did it 
> correctly.  I start the Apache HTTP Web Server as a service and then try to 
> navigate to the virtual host URL, but I get MS Edge's error page about it not 
> being able to reach the page.

The 2nd two proxypass/proxypass reverse are redundant, you are already
forwarding /
The virtualhost looks fine, as long as that hostname actually leads
you to the system running the webserver.
The proxy rules + the virtual host make no sense because it gives the
appearance there's only 1 server involved. Why bother proxying if the
target is just the virtualhost?




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



--
Eric Covener
cove...@gmail.com

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



[users@httpd] Reverse Proxy and Virtual Host

2018-09-19 Thread Osman Zakir
Hi again.

I'm attaching my httpd.conf file here; please read it and tell me if I did it 
correctly.  I start the Apache HTTP Web Server as a service and then try to 
navigate to the virtual host URL, but I get MS Edge's error page about it not 
being able to reach the page.


httpd.conf
Description: httpd.conf

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

Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

2018-09-17 Thread Osman Zakir
I already figured I'd have to keep Apache running at all times.


I'd like it if you guys were to read my httpd.conf and the virtual host 
configuration file to see if I did it correctly.  I did read the documentation 
for it, but I'm not sure if I did correctly and the virtual host also doesn't 
seem to be working correctly (I tried to navigate to the site after starting 
Apache httpd as a service, but it didn't work; how do I correctly navigate to a 
proxied app on Apache?).


Thanks in advance.


From: Frank Gingras 
Sent: Sunday, September 9, 2018 8:17:34 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy

See http://httpd.apache.org/docs/2.4/howto/reverse_proxy.html and 
http://www.apachetutor.org/admin/reverseproxies.

You do need to have a httpd instance running at all times; how else do you 
think it will serve requests?

Lastly, your comment about the documentation is a bit odd - perhaps you could 
offer constructive comments on specific sections instead, so that we could work 
on improving it. A lot of folks dedicated a lot of time writing it, and even 
more would benefit from improvements.

On Thu, Sep 6, 2018 at 7:42 PM Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:

I have a web application I want to deploy behind a reverse proxy.


Do I have to do this on my own computer with the instance of the Apache HTTP 
Server that I've installed on my machine, or is it possible to do this on the 
Apache somehow as well?  If possible, I'd like to do the latter because I'd 
prefer not having to always keep my computer on.


The reason I want a reverse proxy is because my application has its own httpd( 
written in C++).  I'd like the application to be publicly available on the 
Internet.


If I set up a virtual host with Apache (with a public IP, one that isn't 
127.0.0.1, and one I can navigate to from anywhere), will that make the 
application publicly available as I intend?


I'll also need help on setting up virtual hosts and a reverse proxy since the 
Apache documentation is too technical for me (I did try reading it).


httpd.conf
Description: httpd.conf


httpd-vhosts.conf
Description: httpd-vhosts.conf

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

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

2018-09-16 Thread Osman Zakir
The app works perfectly on localhost.  I just want to use a reverse proxy as a 
deployment option.  I'm putting the Google Maps API Key and the Currencylayer 
API Access Key in environment variables.  The app uses Google Maps as the GUI, 
so of course if the API Key doesn't make it to the HTML file, the app won't 
show up and all you'll see is a Google Maps error page talking about an invalid 
Google Maps API Key.  The currency conversion form is on the info window on the 
map, so unless I get this to work first, I can't test anything else to see if 
it's working.  But yeah, again, it works perfectly on localhost; it's a 
currency conversion app using a Google Map as its GUI whose backend app is 
itself a web server (written in C++ and compiled using the MSVC compiler; it's 
a Windows executable).  I could've used a VPS as well, but I'm on a budget.


I declare the variables holding those keys in the C++ code itself, so I really 
just need to get them to the frontend code.  So I probably need Apache to be 
able to see them as well and put them where they need to be on the frontend 
side.  I already make an AJAX request in the JavaScript code for the 
Currencylayer API Access Key and also use the Jinja2Cpp library for the HTML 
file; I send the the Google Maps API Key to it as the response to the client 
code when it asks for the HTML file.


After getting this to work, I need to know how to set up the reverse proxy and 
virtual host for my app on my Windows 10 PC.


From: Eric Covener 
Sent: Sunday, September 9, 2018 6:49:11 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Reverse Proxy for Web Application (or adding it as 
extension to Apache web server)

On Sat, Sep 8, 2018 at 9:37 PM Osman Zakir  wrote:
>
> 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.

That's asking a lot.

> 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.

Did you disable the reverse proxy config?  I'm surprised you "only"
had environment variable problems.  Or did it not work at all and this
is just an unnecessary tangent?

> If I go back to the reverse proxy route, I'd have to take out the environment 
> variables I guess.
This relationship doesn't make sense.  If you had no proxy, you'd set
environment variables your backend server could see.  Adding a reverse
proxy doesn't change anything.


>(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?).

Hide from who?

> 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.

If you have a working backend service, and you put the bog-standard
Apache reverse proxy in front of it, what specifically in terms of the
request or response isn't working?
Putting a reverse proxy in front of a backend service that doesn't
work isn't going to make it start working.

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



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

2018-09-08 Thread Osman Zakir
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 
Sent: Sunday, September 9, 2018 6:00:33 AM
To: users@httpd.apache.org
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  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-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



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

2018-09-08 Thread Osman Zakir
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?).  I've put 
the PassEnv directive into httpd.conv, once each for the environment variables 
I have, but I still get an invalid Google Maps API Key error.  Did I do it 
wrong?  I'm attaching the httpd.conf file here again.  I'm also attaching the 
vhosts configuration file, so please let me if I have that done correctly (the 
file itself, I mean).


I've set the environment variables via the Control Panel, by going to Control 
Panel->System and Security->System and then clicking on "Advanced system 
settings" on the left-hand side (I'm using Windows 10), which brings up a 
window where I can set system-wide environment variables.  So I need to how and 
where to use PassEnv so that it'd pass those environment variables into the 
server application.


From: Eric Covener 
Sent: Saturday, September 8, 2018 9:34:37 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Reverse Proxy for Web Application (or adding it as 
extension to Apache web server)

> For instance, do I really need to add a balancer set when I really only have 
> one web server I need to do this for?

No.

> And I need an email address for the server that I know I'll be able to get 
> emails on, but I don't have a host name aside from the one I'm setting up a 
> virtual host for (and that host name doesn't exist outside of being a virtual 
> host).

What does an email address have to do with HTTP servers?

 I'm confident only in using the same email address as the one for
this Outlook account.

> I also need to know where to add the ProxyPass directive if I do have to set 
> up a reverse proxy.
You can simply append it to httpd.conf if you don't want to restrict
it to a particular incoming virtual host. If you do, use that context
instead.

> And do I also need the ProxyPassReverse directive along with that?
Typically yes.

> In my C++ source file, I have two environment variables for the API keys that 
> it needs to work correctly; since it's a Google Maps application with a 
> currency conversion form on it, it needs a Google Maps API Key and an Access 
> Key for the currency API.  On lines 130 and 133, I use std::getenv() to get 
> the values in the environment variables.  So also need to know how to make 
> that work in Apache.

Apache can't pass environment variables to a backend proxied server
and doesn't start your backend server.  What do you want Apache to do
here?

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



httpd-vhosts.conf
Description: httpd-vhosts.conf


httpd.conf
Description: httpd.conf

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

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

2018-09-08 Thread Osman Zakir
What I want Apache to do is to serve my application behind a reverse proxy.


For the email address thing, I meant to ask about the email address used for 
the ServerAdmin directive.


If Apache can't pass environment variables to proxied servers, do have to 
hardcode the API keys that my application needs?  Or is there still a way to 
hide the keys that could work with Apache?  The Googles Maps API Key would be 
visible in DevTools (if the user presses F12 for instance), but I can restrict 
the key to my virtual host so that it only works for my app (they ask for a 
domain name; please correct me if I'm wrong, but I think that a virtual host 
would also work here).


And yes, I do actually want it so that the proxy server is restricted to the 
virtual host I set up.  Would that be a bad idea?  I only want to serve my 
application with this behind a reverse proxy, after all.


From: Eric Covener 
Sent: Saturday, September 8, 2018 9:34:37 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Reverse Proxy for Web Application (or adding it as 
extension to Apache web server)

> For instance, do I really need to add a balancer set when I really only have 
> one web server I need to do this for?

No.

> And I need an email address for the server that I know I'll be able to get 
> emails on, but I don't have a host name aside from the one I'm setting up a 
> virtual host for (and that host name doesn't exist outside of being a virtual 
> host).

What does an email address have to do with HTTP servers?

 I'm confident only in using the same email address as the one for
this Outlook account.

> I also need to know where to add the ProxyPass directive if I do have to set 
> up a reverse proxy.
You can simply append it to httpd.conf if you don't want to restrict
it to a particular incoming virtual host. If you do, use that context
instead.

> And do I also need the ProxyPassReverse directive along with that?
Typically yes.

> In my C++ source file, I have two environment variables for the API keys that 
> it needs to work correctly; since it's a Google Maps application with a 
> currency conversion form on it, it needs a Google Maps API Key and an Access 
> Key for the currency API.  On lines 130 and 133, I use std::getenv() to get 
> the values in the environment variables.  So also need to know how to make 
> that work in Apache.

Apache can't pass environment variables to a backend proxied server
and doesn't start your backend server.  What do you want Apache to do
here?

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



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

2018-09-08 Thread Osman Zakir
I have a web application I created that has a backend written in C++ with its 
own built-in web server.  I want to deploy it behind Apache's reverse proxy (or 
as an extension to the Apache web server (would that be different?), so I want 
to know how to do it correctly considering my situation.


I read the Reverse Proxy Guide article on the Apache website, but there are 
still confusions that I have.  For instance, do I really need to add a balancer 
set when I really only have one web server I need to do this for?  And I need 
an email address for the server that I know I'll be able to get emails on, but 
I don't have a host name aside from the one I'm setting up a virtual host for 
(and that host name doesn't exist outside of being a virtual host).  I'm 
confident only in using the same email address as the one for this Outlook 
account.  I also need to know where to add the ProxyPass directive if I do have 
to set up a reverse proxy.  And do I also need the ProxyPassReverse directive 
along with that?


In my C++ source file, I have two environment variables for the API keys that 
it needs to work correctly; since it's a Google Maps application with a 
currency conversion form on it, it needs a Google Maps API Key and an Access 
Key for the currency API.  On lines 130 and 133, I use std::getenv() to get the 
values in the environment variables.  So also need to know how to make that 
work in Apache.  I read about the environment variable directive in the 
httpd.conf file, but I also read that it's not the same thing as the 
OS-specific environment variables that I'm using.  The files are attached to 
this message, along with httpd.conf, httpd-vhosts.conf and proxy-html.conf.  
I'm linking to the Gist with the JavaScript code here, since attaching it 
doesn't seem to work well (there's a red circle with a slash appearing on the 
file): https://gist.github.com/DragonOsman/c6e8fb15343544e662f474c5a526d1c2 .


Just so you guys know, I'm using this on my own laptop PC.  I don't like how 
I'll have to keep it on at all times when the application is online, but have 
no other way to do this as of right now.
#map {
height: 100%;
}

html, body {
height: 100%;
margin: 0;
padding: 0;
}

form {
text-align: center;
}

#search-input {
white-space: nowrap;
}

#search-input {
background-color: #fff;
font-family: Roboto;
font-size: 15px;
font-weight: 300;
margin-left: 12px;
padding: 0 11px 0 13px;
text-overflow: ellipsis;
width: 400px;
}

#search-input:focus {
border-color: #4d90fe;
}
Title: DragonOsman Currency Converter







// Osman Zakir 
// 3 / 16 / 2018 
// Google Maps GUI + Currency Converter Web Application 
// This application uses a Google Map as its UI.  The user's geolocation is 
taken if the browser has permission, and an info window 
// is opened at that location which displays a HTML form.  The form has an 
input element to type in the amount of money in the base 
// currency to convert, two dropdown menus populated with a list of currencies 
requested from the currency API, and a button to submit 
// the form. By default, the base currency is USD and the resulting currency is 
the currency used at the place that the info window is 
// opened on.

// Google's Geocoder and Reverse Geocoding Service returns status 
"ZERO_RESULTS" for Western Sahara, Wake Island, and Kosovo. Both dropdown
// menus switch to AED in that situation. The status means that there are no 
results to show even though reverse geocodng did work.

// This C++ application is the web server for the application. It acts as both 
a servera and a client, as it also has to query the currency API,
// currencylayer.com, on its currency conversion endpoint and get the 
conversion result to return to the front-end code.  It also holds two
// environment variables, one to hold the Google Maps API Key and the other to 
hold the currencylayer.com API access key.  
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

using tcp = boost::asio::ip::tcp;   // from 
using nlohmann::json;   // from 

namespace http = boost::beast::http;// from 


//--


// Function to return a reasonable mime type based on the extension of a file.
boost::beast::string_view mime_type(boost::beast::string_view path);

// This class represents a cache for storing results from the
// currency exchange API used by currencylayer.com
class cache_storage
{
public:
cache_storage(const std::chrono::seconds )
: m_cache{}, m_duration{ duration }
{
}

// This functi

Re: [users@httpd] DocumentRoot doesn't exist (but it's giving the wrong name)

2018-09-07 Thread Osman Zakir
So it's in the vhosts.conf file?


By the way, I sent another email earlier that hasn't had a reply yet -- did I 
ask a stupid or maybe a too-simple question and that's why no one's replied 
yet?  I don't mean to whine, I'm just asking.


From: angel Hall-Coulston 
Sent: Saturday, September 8, 2018 4:55:14 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] DocumentRoot doesn't exist (but it's giving the 
wrong name)

Hi,
‘Dummy-host.example.com<http://Dummy-host.example.com>’ is in your Virtual Host 
Conf as a default example and apache is trying to find it and of course can’t 
so won’t run. You can either change, comment out or don’t include virtual hosts.

Regards,
Angel

On 7 Sep 2018, at 22:33, Osman Zakir 
mailto:osmanzaki...@hotmail.com>> wrote:

I downloaded Apache 2.4.33 (I had 2.4.29 until now, so I just upgraded) and 
tried to start it, but I got a warning saying: 
"DocumentRoot[C:/Apache24/docs/dummy-host.example.com<http://dummy-host.example.com/>]
 does not exist". But in my httpd.conf file, DocumentRoot is set to 
ServerRoot/htdocs.  And when I try to go to localhost, I get a 403 Forbidden 
error.  I have attached my configuration file here.


[users@httpd] DocumentRoot doesn't exist (but it's giving the wrong name)

2018-09-07 Thread Osman Zakir
I downloaded Apache 2.4.33 (I had 2.4.29 until now, so I just upgraded) and 
tried to start it, but I got a warning saying: 
"DocumentRoot[C:/Apache24/docs/dummy-host.example.com] does not exist". But in 
my httpd.conf file, DocumentRoot is set to ServerRoot/htdocs.  And when I try 
to go to localhost, I get a 403 Forbidden error.  I have attached my 
configuration file here.


httpd.conf
Description: httpd.conf

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

[users@httpd] Want to Deploy Web App Behind a Reverse Proxy

2018-09-06 Thread Osman Zakir
I have a web application I want to deploy behind a reverse proxy.


Do I have to do this on my own computer with the instance of the Apache HTTP 
Server that I've installed on my machine, or is it possible to do this on the 
Apache somehow as well?  If possible, I'd like to do the latter because I'd 
prefer not having to always keep my computer on.


The reason I want a reverse proxy is because my application has its own httpd( 
written in C++).  I'd like the application to be publicly available on the 
Internet.


If I set up a virtual host with Apache (with a public IP, one that isn't 
127.0.0.1, and one I can navigate to from anywhere), will that make the 
application publicly available as I intend?


I'll also need help on setting up virtual hosts and a reverse proxy since the 
Apache documentation is too technical for me (I did try reading it).