g***@gmail.com
2018-10-10 14:43:36 UTC
I premise I'm not an apache2 wizard or expert so you can freely call me noob. I have this problem: two servers with two distinct apache2, the first accepting requests from internet and forwarding them to the second, the second managing requests and retrieving files from the filesystem.
I set the virtual host of the first in this way:
<VirtualHost *:443>
ServerName www.asd.mysite.it
ServerAlias asd.mysite.it
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLCertificateFile certificate.crt
SSLCertificateKeyFile private.key
SSLCertificateChainFile ca_bundle.crt
ErrorLog /var/log/apache2/error_log_bugs
CustomLog /var/log/apache2/access_log_bugs combined
ProxyRequests Off
ProxyPreserveHost On
RewriteEngine on
ProxyPass / http://192.168.0.53/mantisbt/
ProxyPassReverse / http://192.168.0.53/mantisbt/
</VirtualHost>
I set the virtual host of the second in this way:
<VirtualHost *:80>
ServerAdmin ***@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/mantisbt">
AllowOverride All
</Directory>
</VirtualHost>
Under /var/www/html/mantisbt/ there is the MantisBT site (php, subfolders and so on).
If in my browser I insert http://192.168.0.53/mantisbt/ I see the right page, if I insert asd.mysite.it my url is translated in https://asd.mysite.it/mantisbt/login_page.php and I have the error:
The requested URL /mantisbt/mantisbt/login_page.php was not found on this server.
I can't understand why the mantisbt folder is repeated twice. Where am I wrong?
Thanks
I set the virtual host of the first in this way:
<VirtualHost *:443>
ServerName www.asd.mysite.it
ServerAlias asd.mysite.it
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLCertificateFile certificate.crt
SSLCertificateKeyFile private.key
SSLCertificateChainFile ca_bundle.crt
ErrorLog /var/log/apache2/error_log_bugs
CustomLog /var/log/apache2/access_log_bugs combined
ProxyRequests Off
ProxyPreserveHost On
RewriteEngine on
ProxyPass / http://192.168.0.53/mantisbt/
ProxyPassReverse / http://192.168.0.53/mantisbt/
</VirtualHost>
I set the virtual host of the second in this way:
<VirtualHost *:80>
ServerAdmin ***@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/mantisbt">
AllowOverride All
</Directory>
</VirtualHost>
Under /var/www/html/mantisbt/ there is the MantisBT site (php, subfolders and so on).
If in my browser I insert http://192.168.0.53/mantisbt/ I see the right page, if I insert asd.mysite.it my url is translated in https://asd.mysite.it/mantisbt/login_page.php and I have the error:
The requested URL /mantisbt/mantisbt/login_page.php was not found on this server.
I can't understand why the mantisbt folder is repeated twice. Where am I wrong?
Thanks