OSDir


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

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


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 <covener@xxxxxxxxx>
Sent: Sunday, September 23, 2018 10:56 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: [users@httpd] IP address used by Apache reverse proxy?
 


On Sun, Sep 23, 2018, 10:55 AM Osman Zakir <osmanzakir90@xxxxxxxxxxx> 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 <thumbs@xxxxxxxxxx>
Sent: Saturday, September 22, 2018 6:38 AM

To: users@xxxxxxxxxxxxxxxx
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 <osmanzakir90@xxxxxxxxxxx> 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 <thumbs@xxxxxxxxxx>
Sent: Saturday, September 22, 2018 4:07 AM
To: users@xxxxxxxxxxxxxxxx
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 <osmanzakir90@xxxxxxxxxxx> 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 <thumbs@xxxxxxxxxx>
Sent: Saturday, September 22, 2018 3:02 AM
To: users@xxxxxxxxxxxxxxxx
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 <osmanzakir90@xxxxxxxxxxx> 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 <thumbs@xxxxxxxxxx>
Sent: Saturday, September 22, 2018 2:47 AM
To: users@xxxxxxxxxxxxxxxx
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:




On Fri, Sep 21, 2018 at 10:41 AM Osman Zakir <osmanzakir90@xxxxxxxxxxx> 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 offers you a free subdomain for your website.


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

Attachment: httpd.conf
Description: httpd.conf

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