We are trying to host a static webpage (just one index.php) on a local wifi network without internet access. Essentially every user (mobile devices) should land on some landing page where he can upload some files to our server.
We have tried two approaches:
1.) We have set up a captive portal by responding to /generate_204 with http code 302. On Android this triggers the "Sign into wifi" popup and opens up a kind of dummy browser (the usual one for captive portals), unfortunately this browser does not support file upload (
Is there the possibility to escape (for example via a link) from the dummy browser to the default browser? Is it possible to upload files in the dummy browser?
2.) Responding all client dns requets with the server's ip. In this case any url should be redirected to our webserver. This is configured with dnsmasq via
address=/#/192.168.1.1. When entering a website via http the user is correctly redirected. In the case of https this does not work, maybe because of HSTS (?). In most browsers url's entered without
www are queried as search results and therefore automatically transmitted as a https request. Here the question would be how to successfully redirect https requests to our webserver?
In general we just want an easy method, so that every user ends up on our webpage to upload there files without having to type anything explicitly.
DNS and DHCP sever is dnsmasq
WebServer is apache2 listening on 80 and 443