I have a Windows server running a Rails application via the Thin ruby gem web server through Cygwin 32 bit. The server only listens on port 443 and uses HTTPS because it is using LDAP authentication and I did not want to have plain text passwords on the wire. I would like to have a super simple, down and dirty proxy to redirect http to https. Can this be achieved via nc or some other cygwin tool without having to install something like squid or apache?
Asked
Active
Viewed 2,296 times
0
-
4"I have a Windows server running a Rails application via the Thin ruby gem web server through Cygwin 32 bit." <--- you know your life would be much more simple if you'd stop fighting windows and install a proper *nix server. – EEAA Aug 22 '13 at 16:13
-
I am a Linux admin primarily, I set this server up for a marketing guy to admin (he wrote the app). I needed to make it easy for him to navigate. I used cygwin so I wouldnt have to deal with Windows shell, and so I could write startup and backup scripts more easily, and to simplify package management. I would have preferred CentOS. – Aug 22 '13 at 17:23
1 Answers
2
Theoretically, nc
can take traffic on port 80 and ship it off to port 443.
However, that's not going to work for you.
You need a reverse proxy like nginx, apache, or other HTTP-aware bit that can do an HTTP-level redirect to instruct the browser to connect using HTTPS. nc
can't operate at that level. Heck, you could even start up a very simple ruby app that listens on port 80 and does the redirect for you.

EEAA
- 109,363
- 18
- 175
- 245