Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-17-2011, 08:22 PM   #1
Registered: Aug 2009
Posts: 87

Rep: Reputation: 16
Apache rewrite help

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 I have it working if I type that directly into a browser, but the next part is not working correctly. If someone types, I want it to automatically redirect to the secure site.

My current setup is as follows:

https virtual server:
ProxyPass /webmin/ http://localhost:10000/
ProxyPassReverse /webmin/ http://localhost:10000/
<proxy *>
        allow from all
This works just fine.

http virtual server:
<Directory /home/aaron/web-root/webmin/>
        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
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:
[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.

Last edited by vockleya; 06-17-2011 at 08:52 PM.
Old 06-17-2011, 11:36 PM   #2
Registered: Aug 2009
Posts: 87

Original Poster
Rep: Reputation: 16
I discovered the solution. I needed to use <Location> instead of <Directory> to control access to the proxies.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Rewrite mahmoud Linux - Software 2 11-11-2008 07:52 AM
Apache Rewrite mahmoud Linux - Newbie 2 10-08-2008 08:11 AM
Apache rewrite rule help kinetik Linux - Software 1 11-05-2007 11:18 AM
apache rewrite help deesto Linux - Server 3 11-03-2006 02:07 PM
Need help with Apache rewrite kinetik Linux - General 6 05-19-2006 06:02 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration