Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible for stunnel to detect non-SSL requests and issue a redirect to HTTPS URL?

Or maybe it's possible to have stunnel mark these requests somehow and let the underlying app issue the redirect?

Or is there an alternative to stunnel which can do this?

EDIT: it turns out I'm actually looking for a lightweight HTTPS proxy which can do the thing above.

share|improve this question
Stunnel is a simple SSL tunnel. It doesn't know anything about HTTP, or HTTP redirects. It doesn't add headers, or do anything else. It isn't clear from the question what you are using it for, but you may need to look at HTTP proxies. – Zoredache May 30 '13 at 17:22
@Zoredache you're right, I wasn't aware that stunnel works on a lower level. I should be looking for some lightweight HTTP proxy which can do the thing described. – Hardex May 30 '13 at 20:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.