The title explains most of my question. The OS is linux (Lubuntu). The servers are Apache2 (PHP5), MySQL 5.6 and FTP (Samba).
closed as too broad by John Conde♦ Sep 9 '14 at 1:51
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
You can prevent hacking to an extent however, nothing is perfect and there are always flaws in any system. Asking a question with such little detail prevents a comprehensive insightful answer. It's advisable to read up and practice Linux and PHP security concepts. However it's impossible to make your website "hackproof", you can make it "hack-resistant" though. Secure the core, code your application securely and it might not be a bad idea to invest in a firewall on the network, server and web application layers.