We help IT Professionals succeed at work.

apache reverse proxy config for http to https

sgaur
sgaur asked
on
Medium Priority
450 Views
Last Modified: 2012-05-06
I have a apache proxy that contains multiple virtual hosts

In one of the hosts, I like to have users coming in on http but I want then to go to https instead.
https is working as I can go directly to that url but I want apache reverse proxy to redirect that url to https. I have not configured http redirect in reverse proxy before and examples would be appreciated.
Comment
Watch Question

sysadmin
CERTIFIED EXPERT
Commented:
Can't you do simple redirect in your http VirtualHost environment? (Redirect / https://your.vhost.tld/ within <VirtualHost..> directives).

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Commented:
Try this:
-----------------------------
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /foo https://foo.example.com/bar
ProxyPassReverse /foo https://foo.example.com/bar 
-----------------------------

Author

Commented:
thanks for your inputs.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.