redirection on apache server

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

 



Hello apache fellows,‌
I have set up an apache server on a raspbian unit but I am not that clever on network apart basic configuration, port forwarding and authentication process. I got letsencrypt certification so that to enable https access.
I wanted to put some big files on another raspbian machine on the same lan and wanted to access it on the same domain, say toto.org via http://toto.org/server2/.
The main server has ip adress 192.168.1.40, the secondary is 192.168.1.45.I wanted all traffic to be dealt with by primary server except all incoming request on toto.org/server2/.
I have understood that some apache directives allowed to do that especially Rerwrite one. I tried the following code :
{code]
RewriteEngine on
RewriteRule ^/server2$ http://toto.org/server2/ [R] [L]
RewriteRule ^/server2/(.*) http://192.168.1.45/$1 [P]
[code]
and I wrapped that in a <VirtualHost> tag as I thought I should.
But my apache server doesn't want to start anymore with that clause. Could you show me exemples of apache configuration doing something similar like redirecting a part of traffic toward a secondary server? Could Redirect directive be more appropriate? Thank you for any clue.
JT‌

[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