A
A
Arseniy Latypov2019-12-17 14:37:55
Apache HTTP Server
Arseniy Latypov, 2019-12-17 14:37:55

How to make a correct redirect in mod_proxy apache2?

Good day to all!
I have an Apache2 server that uses mod_rewrite for redirects in an .htaccess file located in the /var/www/html directory,

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule ^ humhub/index.php [NC,L]

but I want to implement this using mod_proxy, which is located separately, it would seem, what is the difficulty? and the fact that the redirect works very strangely, I give the virtual host file for review:
<VirtualHost *:80>
        ServerAdmin [email protected]
        DocumentRoot "/var/www/html"
        ServerName      corp.test.ru
        ServerAlias     corp.test.ru www.corp.test.ru
        ProxyRequests Off
        ProxyPreserveHost On
        ProxyVia full
        <Proxy *>
        Order deny,allow
        Allow from all
        </Proxy>
        ProxyPass /  http://192.168.6.93:14799/humhub/
        ProxyPassReverse /  http://192.168.6.93:14799/humhub/
</VirtualHost>

When accessing the mod_proxy site, the url changes, as in the case of mod_rewrite, but the server reports an error.
5df8bc75de1dc392704714.png
An example of how it works with mod_rewrite and as you can see the site opens
5df8bdcd2019a773791541.png
Please, tell me, what could be the problem? What am I doing wrong?
Thank you all in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question