Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] using apache proxy via dns subdomains
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tuner23
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2006
Posts: 82

PostPosted: Tue Jul 19, 2011 7:03 pm    Post subject: [SOLVED] using apache proxy via dns subdomains Reply with quote

Hy,

i wonder if it is possible to forward http-requests with apache-proxy depending on the subdomains to different hosts.

e.g.
web.dns.org to 10.1.1.2
wiki.dns.org to 10.1.1.3

and maybe you can give some hints how to manage this?


thanks in advance,
antonios.


Last edited by tuner23 on Tue Aug 02, 2011 6:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Fri Jul 22, 2011 2:25 pm    Post subject: Reply with quote

You need two virtual hosts... here's a starting point:

Code:
<VirtualHost *:80>
   ServerName web.dns.org
   <Location />
      ProxyPass http://10.1.1.2/
      ProxyPassReverse http://10.1.1.2/
   </Location>
</VirtualHost>

<VirtualHost *:80>
   ServerName wiki.dns.org
   <Location />
      ProxyPass http://10.1.1.3/
      ProxyPassReverse http://10.1.1.3/
   </Location>
</VirtualHost>


If you have trouble with the links in the proxied pages, you may also need to use mod_proxy_html to rewrite them... if so then make sure you're using version 3.0.1 because 3.0.0 was broke last time I checked.
Back to top
View user's profile Send private message
tuner23
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2006
Posts: 82

PostPosted: Tue Aug 02, 2011 4:53 pm    Post subject: Reply with quote

hy kimmie,

thank you for your answer.
Now it works (partially).

What i did:
1. I have enabled the use-flags (was also added before): proxy proxy_http
2. My configuration:
Code:

<VirtualHost *:80>
   ServerName web.dns.org
   <Location />
      RewriteEngine On
      ProxyPass http://10.1.1.2/index.php/Main_Page
      ProxyPassReverse http://10.1.1.2/index.php/Main_Page
   </Location>
</VirtualHost>


But now it's only HTML without the css-layout.

What is the problem for this? Did i missed some modules?
Or what else?

Hope someone can help me..

Thanks,
Antonios.
Back to top
View user's profile Send private message
tuner23
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2006
Posts: 82

PostPosted: Tue Aug 02, 2011 6:22 pm    Post subject: Reply with quote

Hy

now it works.

First i thought it was a problem with the firewall,
but i had to pass without the URL without the URL-path.. Like described above :-/

Code:

<VirtualHost *:80>
   ServerName web.dns.org
   <Location />
      RewriteEngine On
      ProxyPass http://10.1.1.2/
      ProxyPassReverse http://10.1.1.2/
   </Location>
</VirtualHost>


Thanks for your help,

Antonis.
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Tue Aug 02, 2011 9:17 pm    Post subject: Reply with quote

np :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum