I am trying to set up my server and am having some trouble. I need to have webmin proxied through apache, so that I can access it from
https://www.mysite.com/webmin/. I have it working if I type that directly into a browser, but the next part is not working correctly. If someone types
http://www.mysite.com/webmin/, I want it to automatically redirect to the secure site.
My current setup is as follows:
https virtual server:
Code:
ProxyPass /webmin/ http://localhost:10000/
ProxyPassReverse /webmin/ http://localhost:10000/
<proxy *>
allow from all
</proxy>
This works just fine.
http virtual server:
Code:
<Directory /home/aaron/web-root/webmin/>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}https://www.vockley.com/webmin/
</Directory>
This doesn't work. I believe it is because the /webmin/ directory does not actually exist in /web-root/. It is just a proxied link. Apache give this error message when I try to access Webmin through this method:
Code:
[error] [client **.***.**.***] File does not exist: /home/aaron/web-root/webmin
Notice there is no trailing "/" on that path. There should be in order for the proxy in the https virtual server to pick up on it.
I just set up phymyadmin using the same directives. The same problem is occurring with this too. Apache is looking for /home/aaron/web-root/phpmyadmin instead of /home/aaron/web-root/phpmyadmin/.
Any thoughts?
I hope this explanation is good enough. I'll do my best to answer any questions. Any help will be greatly appreciated.