I've setup web servers in the past, but now I'm working on an embedded Linux project that is a bit different. I need the embedded Linux device to
- run an Apache server
- support DHCP
- not require any DNS setup
- (needs to basically be plug-n-play and idiot proof).
I'm a bit unsure how to do an HTTP to HTTPS redirect. What makes it tough is that I will not know the DNS or the IP. Is there a way for the mod-rewrite to dynamically detect the current IP and redirect to HTTP like this:
RewriteRule ^(.*)$ https://[(currentDHCPIPAddress)/$1 [L,R=301]
Most of the traffic will be from the internal LAN, so I can't do some sort of firewall magic.
If anyone else has any ideas to achieve this I would love to hear suggestions. It's a bit different than the way you'd ever want to setup most servers, so it has stumped me for the moment and most docs don't prepare you for this sort of use case.