[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 437
  • Last Modified:

apache reverse proxy config for http to https

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.
0
sgaur
Asked:
sgaur
2 Solutions
 
Maciej SsysadminCommented:
Can't you do simple redirect in your http VirtualHost environment? (Redirect / https://your.vhost.tld/ within <VirtualHost..> directives).
0
 
ht-docsCommented:
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 
-----------------------------
0
 
sgaurAuthor Commented:
thanks for your inputs.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now