To develop my website I have the pre-installed Apache set up on my Mac and didn't realize until today that the website on my Mac is actually accessible by other devices in the network, too. This is incredibly helpful for me as it makes it easier to develop for mobile devices.
On the other hand, this means, that every time I am connected to a public network (which is the case during about 6 hours per day for me), someone could access the page that I am hosting. Nothing wrong with that so far as all the information is publicly available anyway but could someone actually enter my computer from there? I SUPPOSE the hacker can't just remotely put a file on my disk and run it but would my machine now be vulnerable to threats like SQL injections or similar? Are there other attacks, one could try to get into my computer?
And what are possible security measures for this? My computer is password-protected, I didn't host my website on
/ (typing my IP address in a browser field only returns the "It works!" as I have my website in a directory a bit deeper than that) and I will now keep apache deactivate most of the time.