You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Arnold <ca...@electrichendrix.com> on 2008/07/16 17:41:00 UTC
[users@httpd] Send a request to another apache server
Using apache2 2.2.3 on SLES10 SP2. What we have:
1 webserver on 123 subnet. Answers for port 80
1 email server with it's own small apache server on 124 subnet answers for port 8080
1 firewall/router with 1 IP (forwards to internal server addresses)
What we want to do:
When users enter some address in their browser, say webmail.domain.tld (which goes to server 1 on port 80) to goto the second server on 124 subnet on port 8080. Is there anyway to tell server 1 on port 80, when a specific url comes to it, send to second server on port 8080? Can this be done with the .htaccess file? Or can it be done at all? Thanks for any doc's/help
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Send a request to another apache server
Posted by Dimitri Yioulos <dy...@firstbhph.com>.
On Friday 18 July 2008 11:40 am, Dragon wrote:
> Chris Arnold wrote:
> >I have searched around and there are many helps on the internet but
> >none seem to address my issue. They have a some-domain.tld site on
> >the apache server (where i am making the changes to vhost.conf) and
> >i want the requests that come to that apache server to (based on a
> >dns address, webmail.some-domain.tld) to then be sent to different
> >server which runs the webmail interface. What am i missing? This
> >kinda seems to be a "port" redirect.....
>
> ---------------- End original message. ---------------------
>
> Does the webmail application reside on a physically different machine
> with a different IP address?
>
> If so, the easiest (and best) way to do that is via proper DNS and
> routing to the right machine for each application. Why would you want
> to have Apache do what your router should be doing?
>
>
> Dragon
>
Why not do a redirect? We have a webmail application as well, which lives on
a different server. I didn't want users to have to remember a new URL to
access it, so by using the Redirect directive in httpd.conf on our Web
server, users enter the URL http://www.ourwebsrvr.com/webmailprog, they're
redirected to the webmail server (and presented ssl-enabled page, to boot).
The directive looks like this, keeping in mind the URL that users enter into
their browsers (see above):
Redirect /webmailprog https://oursecondsrvr.ourdomain.com/proggy/proggy.pl
Of course, there's plenty of info out there on the Redirect directive.
Is that what you're after?
Dimitri
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Send a request to another apache server
Posted by Dragon <dr...@crimson-dragon.com>.
Chris Arnold wrote:
>I have searched around and there are many helps on the internet but
>none seem to address my issue. They have a some-domain.tld site on
>the apache server (where i am making the changes to vhost.conf) and
>i want the requests that come to that apache server to (based on a
>dns address, webmail.some-domain.tld) to then be sent to different
>server which runs the webmail interface. What am i missing? This
>kinda seems to be a "port" redirect.....
---------------- End original message. ---------------------
Does the webmail application reside on a physically different machine
with a different IP address?
If so, the easiest (and best) way to do that is via proper DNS and
routing to the right machine for each application. Why would you want
to have Apache do what your router should be doing?
Dragon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Send a request to another apache server
Posted by Chris Arnold <ca...@electrichendrix.com>.
I have searched around and there are many helps on the internet but none seem to address my issue. They have a some-domain.tld site on the apache server (where i am making the changes to vhost.conf) and i want the requests that come to that apache server to (based on a dns address, webmail.some-domain.tld) to then be sent to different server which runs the webmail interface. What am i missing? This kinda seems to be a "port" redirect.....
So, this is what i have in my vhost.conf file:
<VirtualHost webmail.some-domain.com:80>
ServerName some-domain.com
RedirectPermanent / http://webmail.some-domain.com:8080
</VirtualHost>
Then i restart apache. Goto webmail.some-domain.com and i am taken to my webpage and it should take me to our web email. I have mod_alias loaded, according to phpinfo found at http://mytimewithgod.net/phpinfo.php.
I also have their website hosted on my server. Here is that section from vhost.conf:
<VirtualHost *:80>
ServerAdmin administrator@some-domain.com
ServerName some-domain.com
ServerAlias www.some-domain.com
DocumentRoot /path/to/web/site/some-domain
# if not specified, the global error log is used
ErrorLog /var/log/apache2/some-domain-error_log
CustomLog /var/log/apache2/some--access_log combined
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off
# configures the footer on server-generated documents
ServerSignature On
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/path/to/web/site/some-domain">
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
These 2 sections are separate in the vhost.conf file. Thanks again for any help.
On Wed, Jul 16, 2008 at 12:41 PM, Chris Arnold
<ca...@electrichendrix.com> wrote:
> Using apache2 2.2.3 on SLES10 SP2. What we have:
>
> 1 webserver on 123 subnet. Answers for port 80
> 1 email server with it's own small apache server on 124 subnet answers for port 8080
> 1 firewall/router with 1 IP (forwards to internal server addresses)
>
> What we want to do:
> When users enter some address in their browser, say webmail.domain.tld (which goes to server 1 on port 80) to goto the second server on 124 subnet on port 8080. Is there anyway to tell server 1 on port 80, when a specific url comes to it, send to second server on port 8080? Can this be done with the .htaccess file? Or can it be done at all? Thanks for any doc's/help
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Send a request to another apache server
Posted by Chris Arnold <ca...@electrichendrix.com>.
>Hi,
Hi
><VirtualHost webmail.domain.com:80>
> ServerName domain.com
> RedirectPermanent / https://destination.domain.com
></VirtualHost>
So, this is what i have in my vhost.conf file:
<VirtualHost webmail.some-domain.com:80>
ServerName some-domain.com
RedirectPermanent / http://otherdomain.com:8080
</VirtualHost>
Then i restart apache. Goto webmail.some-domain.com and i am taken to my webpage and it should take me to our web email. I have mod_alias loaded, according to phpinfo found at http://mytimewithgod.net/phpinfo.php.
I also have their website hosted on my server. Here is that section from vhost.conf:
<VirtualHost *:80>
ServerAdmin administrator@some-domain.com
ServerName some-domain.com
ServerAlias www.some-domain.com
DocumentRoot /path/to/web/site/some-domain
# if not specified, the global error log is used
ErrorLog /var/log/apache2/some-domain-error_log
CustomLog /var/log/apache2/some--access_log combined
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off
# configures the footer on server-generated documents
ServerSignature On
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/path/to/web/site/some-domain">
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
These 2 sections are separate in the vhost.conf file. Thanks again for any help.
On Wed, Jul 16, 2008 at 12:41 PM, Chris Arnold
<ca...@electrichendrix.com> wrote:
> Using apache2 2.2.3 on SLES10 SP2. What we have:
>
> 1 webserver on 123 subnet. Answers for port 80
> 1 email server with it's own small apache server on 124 subnet answers for port 8080
> 1 firewall/router with 1 IP (forwards to internal server addresses)
>
> What we want to do:
> When users enter some address in their browser, say webmail.domain.tld (which goes to server 1 on port 80) to goto the second server on 124 subnet on port 8080. Is there anyway to tell server 1 on port 80, when a specific url comes to it, send to second server on port 8080? Can this be done with the .htaccess file? Or can it be done at all? Thanks for any doc's/help
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Send a request to another apache server
Posted by Darvin Denmian <da...@gmail.com>.
Hi,
im from brasil, i will try to explain (with my good english) how you
can fix this problem:
you can use Redirect, something like this:
<VirtualHost webmail.domain.com:80>
ServerName domain.com
RedirectPermanent / https://destination.domain.com
</VirtualHost>
good luck.....
On Wed, Jul 16, 2008 at 12:41 PM, Chris Arnold
<ca...@electrichendrix.com> wrote:
> Using apache2 2.2.3 on SLES10 SP2. What we have:
>
> 1 webserver on 123 subnet. Answers for port 80
> 1 email server with it's own small apache server on 124 subnet answers for port 8080
> 1 firewall/router with 1 IP (forwards to internal server addresses)
>
> What we want to do:
> When users enter some address in their browser, say webmail.domain.tld (which goes to server 1 on port 80) to goto the second server on 124 subnet on port 8080. Is there anyway to tell server 1 on port 80, when a specific url comes to it, send to second server on port 8080? Can this be done with the .htaccess file? Or can it be done at all? Thanks for any doc's/help
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Send a request to another apache server
Posted by Davide Bianchi <da...@onlyforfun.net>.
Chris Arnold wrote:
> Using apache2 2.2.3 on SLES10 SP2. What we have:
>
> 1 webserver on 123 subnet. Answers for port 80
> 1 email server with it's own small apache server on 124 subnet answers for port 8080
> 1 firewall/router with 1 IP (forwards to internal server addresses)
>
> What we want to do:
> When users enter some address in their browser, say
> webmail.domain.tld
(which goes to server 1 on port 80) to goto the second server on 124
subnet on port 8080. Is there anyway to tell server 1 on port 80, when a
specific url comes to it, send to second server on port 8080? Can this
be done with the .htaccess file? Or can it be done at all? Thanks for
any doc's/help
Yes, by using mod_proxy in combination with VirtualHosts, something like
<VirtualHost *:80>
ServerName webmail.domain.tld
ProxyPass / http://other.web.server.here:8080/
ProxyPassReverse / http://other.web.server.here:8080/
</VirtualHost>
See the documentation about mod_proxy
Davide
--
For their next act, they'll no doubt be buying a firewall running
under NT, which makes about as much sense as building a prison out
of meringue.
-- from alt.sysadmin.recovery
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org