Reverse Proxy redirecting

Reverse Proxy redirecting

by Helson C -
Number of replies: 0

Moodle 3.1+

Apache 2.2.15

CentOS Linux release 7.4.1708 (Core)


IP MOODLE 

192.168.9.2

IP REVERSE PROXY

192.168.9.1


moodle server

config.php

$CFG->wwwroot = 'http://192.168.9.2/moodle'


reverse proxy server

httpd.conf

<VirtualHost *:80>

...

      ServerAlias 192.168.9.1

     <Directory "/var/www/html/wordpress">

AllowOverride All

Options Indexes FollowSymLinks 

Order Allow,Deny

Allow from all

     </Directory>


ProxyPass / http://192.168.9.2/moodle/

ProxyPassReverse / http://192.168.9.2/moodle/

ProxyPreserveHost On

</VirtualHost>



When I put address http://192.168.9.1 on browser the url change automatically to 

http://192.168.9.2/moodle/


Anyone can help me ?


Thanks in advance.

Average of ratings: -