On the router itself. LuCi is run via uhttpd, which is also able to serve custom stuff. No second webserver required, as long as the my.rut/configure(.php) pages are single-user, which should be always the case.
However, you either need to run a custom script to do the mods to the default setup, _OR_ you will need to build a custom image, which might be required, anyway, to include your language of choice. I just saw, that the "standard" SDK from Teltonika does not include PHP (so bad), so your choices then are LUA, Erlang, Perl, Python, Ruby.
Of course, another possibility is to let the enduser provide the wifi credentials on your (public web) server, and then dynamically reconfigure the RUT955. Simplest solution.