View previous topic :: View next topic |
Author |
Message |
tuner23 Tux's lil' helper
Joined: 18 May 2006 Posts: 82
|
Posted: Tue Jul 19, 2011 7:03 pm Post subject: [SOLVED] using apache proxy via dns subdomains |
|
|
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 |
|
|
kimmie Guru
Joined: 08 Sep 2004 Posts: 531 Location: Australia
|
Posted: Fri Jul 22, 2011 2:25 pm Post subject: |
|
|
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 |
|
|
tuner23 Tux's lil' helper
Joined: 18 May 2006 Posts: 82
|
Posted: Tue Aug 02, 2011 4:53 pm Post subject: |
|
|
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 |
|
|
tuner23 Tux's lil' helper
Joined: 18 May 2006 Posts: 82
|
Posted: Tue Aug 02, 2011 6:22 pm Post subject: |
|
|
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 |
|
|
kimmie Guru
Joined: 08 Sep 2004 Posts: 531 Location: Australia
|
Posted: Tue Aug 02, 2011 9:17 pm Post subject: |
|
|
np |
|
Back to top |
|
|
|