Re: Virtual Host port forwarding

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

 



2009/5/12 zm <zzzz_mmmm@xxxxxxxxxxx>:
>
> Hi,
>
> I've installed Apache HTTP Server 2.2.11 and I'm trying to configure it to
> do the following trick:
>
> I have 1 server, connected through 1 router. I payed for domain
> "mydomain.com" (ficticious), and it will point toward my router with
> success.
>
> My router forwards port 80 to my server IP (192.168.1.1), also to port 80.
>
> In my server, I have 2 services running:
>
> Apache HTTP server on port 80
> Webserver (tomcat) on port 8080
> SVN server on port 8081
>
> I want my apache server on port 80 to make the following forwardings:
>
> if "www.mydomain.com" forwards to "192.168.1.1:8080"
> if "svn.mydomain.com" forwards to "192.168.1.1:8081"
> if anything else, fails ... or maybe to a static apache server page that
> presents some static html page, saying "hello there, go away" (it could be
> defined on apache http server itself).
>
> Is it possible to do that?


Yes, that would be possible with Name Based Virtualhosts in
conjunction with mod_proxy.
Please look term that up with a searchengine, as there should be
plenty of examples.

There might be other approaches that can lead to success.



PS: no need to post your message three times, just because the
"Thanks" ist missing. :-)




>
> What configs should I put on "httpd.conf" VirtualHost?
>
> I'm trying with something like:
Like
NameVirtualHost *:80
 <VirtualHost *:80>
    ServerName foobar.org
    DocumentRoot /your/blank/page/dir
 </VirtualHost>



 <VirtualHost *:80>
    ServerName svn.foobar.org

    ProxyRequests On

    <Proxy *>
        Order deny,allow
         Allow from all
    </Proxy>

    ProxyPass / http://192.etc:8081/
    ProxyPassReverse / http://192.etc:8081/

 </VirtualHost>


and so on.
(Example is straight outta http://httpd.apache.org/docs/2.0/mod/mod_proxy.html )

Regards

 <VirtualHost *:80>
    ServerName foobar.org
    DocumentRoot /your/blank/page/dir
 </VirtualHost>


> <VirtualHost svn.mydomain.com:80>
>    ServerName 192.168.1.1:8081
> </VirtualHost>
>
> Should this work?
> --
> View this message in context: http://www.nabble.com/Virtual-Host-port-forwarding-tp23504328p23504328.html
> Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[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