Sure - unless your bash script (nee web server) is running as root, http doesn't have rights to reboot.

Consider adding a NOPASSWD entry for http in sudoers giving it rights to /sbin/reboot (and specify the full path to it in your bash script) and you should be all set.
Keep in mind, however, that this opens up a barrel of monkeys (pun intended) about security, which I won't get into in detail here.
Rodney