Re: Virtual/Proxy setup to internal webserver

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

 



Will do.

I just shut my local forum host off to see what the www.mydomain.com would return as an
error message when the forum link was clicked. I got no error, and the "waiting for forum.mydoamin.com"
was displayed in the status

Are there any traps I can set in the httpd.conf file or within the <VirtualHost> tags?

You know how it goes...there's always one more thing. I'll read up on the <VirtualHost> docs.




.



On Tue, 2018-02-06 at 12:08 -0500, Frank Gingras wrote:
Make sure you match the trailing slashes when proxying too.


On Tue, Feb 6, 2018 at 11:34 AM, Bret Stern <bret_stern@xxxxxxxxxxxxxxxxxxxxx> wrote:
Yann,
This works. Thank you very much.

Would you consider this a safe arrangement?

Here's what I did.

To make it work I did the following.
1. Added a dns subdomain for www.mydomain.com  called forum.mydomain.com
pointing to ip of www.mydowain.com

2. Added a link in my html http://forum.mydomain.com

3. Uncommented proxy_module and proxy_http_module in  /usr/local/etc/apache24/ httpd.conf

4. Added below to httpd.conf
<VirtualHost *:80>
ProxyPass / httpd://internal_lan_host_ip/phpBB3
ProxyReverse / httpd://internal_lan_host_ip/phpBB3
ServerName forum.machinemanagement.com
<VirtualHost>

5. restarted httpd service
Bret







On Tue, 2018-02-06 at 09:51 +0100, Yann Ylavic wrote:
On Tue, Feb 6, 2018 at 8:50 AM, Bret Stern
<bret_stern@machinemanagement.com> wrote:
> I have apache24 running on freebsd.
>
> Can I configure virtual host to direct a request for forum.mydomain.com
> to an internal webserver on my network
>
> eg; DocumentRoot "forum.mydomain.com"

This would be for local documents.

> or "xxx.xxx.xx.xxx"
>
> I tried using Proxy mod but not sure how to setup.

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
<VirtualHost *:80>
    ServerName forum.mydomain.com
    ProxyPass / http://internal_webserver/
    ProxyPassReverse / http://internal_webserver/
</VirtualHost>


Regards,
Yann.

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



--
Bret Stern
Machine Management
Industrial and Commercial IT Services

707-775-9792 (cell-text-direct)



--
Bret Stern
Machine Management
Industrial and Commercial IT Services

707-775-9792 (cell-text-direct)

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux