Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: ProxyPass help needed |
|
Author |
|
Romaytech
Joined: 25 Aug 2016 Posts: 2 Location: NY
|
Posted: Thu 25 Aug '16 21:05 Post subject: ProxyPass help needed |
|
|
I have two servers running on two different computers the setup as follows:
Main single IP address / with the two doming names setup for servera.com and cloud.servera.com
Server 1:
ServerName -servera.com
ip - 192.168.0.103
Running Debian 8.4 Jessie and Apache/2.4.10
Server 2:
ServerName - cloud.servera.com
ip - 192.168.0.105
Running Debian 8.4 Jessie and Apache/2.4.10
I have been trying to setup the servera.com to Proxypass to also use the cloud.servera.com and I am at a loss, when set up, the cloud.servera.com goes back to servera.com. I made sure that a2enmod proxy proxy_http was ran and it is active. I am enclosing my config file that I tried:
NameVirtualHost *:80
ServerName localhost
<VirtualHost *:80>
ServerName servera.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/sitea/
<Location "/">
Options +FollowSymLinks
AllowOverride All
order allow,deny
allow from all
</Location>
</VirtualHost>
<VirtualHost *:80>
ServerName cloud.servera.com
ProxyPreserveHost on
ProxyPass / http://192.168.0.105:80/
ProxyPassReverse / http://192.168.0.105:80/
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
ServerAdmin webmaster@localhost
DocumentRoot /var/www/siteA/
</VirtualHost>
Any help will be greatly appreciated.
Thank You |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 29 Aug '16 12:24 Post subject: |
|
|
Quote: | cloud.servera.com goes back to servera.com |
Does mean what? |
|
Back to top |
|
Romaytech
Joined: 25 Aug 2016 Posts: 2 Location: NY
|
Posted: Mon 29 Aug '16 18:23 Post subject: |
|
|
Hello,
I apologize for not being clear, if I open my browser and try to go to cloud.servera.com it will take me to servera.com
I have DNS with servera.com and cloud.servera.com set up to point to my main IP address which goes to the servera.com (lan ip 192.168.0.103) from there I am trying to use the ProxPass to allow cloud.servera.com which points to lan ip 192.168.0.105 I am not sure if that make sense.
Thank You |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 07 Sep '16 16:01 Post subject: |
|
|
Code: |
servera.com --> VHOST use a local document root
request<-->apache /
\
cloud.servera.com --> vhost with reverse proxy to 192.168.0.105
|
Code: |
<VirtualHost *:80>
ServerName servera.com
DirectoryIndex index.php
DocumentRoot "/Users/you/servera"
<Directory "/Users/you/servera">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName cloud.servera.com
DirectoryIndex index.php
DocumentRoot "/Users/you/empty"
<Directory "/Users/you/empty">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Location />
ProxyPass http://192.168.0.105/
ProxyPassReverse http://192.168.0.105/
</Location>
</VirtualHost>
|
|
|
Back to top |
|
|
|
|
|
|