My apologies that I missed the desire for the web app for which you will need apache or another web server.
The problem you had is that you hadn’t changed the port to 8080 for ospi.py and it couldn’t use port 80 which was already in use by apache. Only one thing can ever use a port on one machine at the same time.
Your last post shows that you do now have ospi.py running on port 8080. Before doing anything else make sure you can access the OSPi on http://10.0.1.21:8080/ and only if that works reinstall apache with
sudo apt-get install apache2
By the way, a lesson here from a sysadmin is not to perform multiple steps and tasks at once since you won’t know which one caused or fixed the problem. And verify every step along the way. By uninstalling apache and changing the port to 8080 /etc/rc.local you will create confusion for yourself as to which did what. In this case you removed apache from running on port 80 and moved ospi.py to port 8080 at the same time. This allows ospi.py to now run but leaves you with nothing running on port 80 rather than two things competing for it.