The title explains most of my question. The OS is linux (Lubuntu). The servers are Apache2 (PHP5), MySQL 5.6 and FTP (Samba).

  • 5
    That's easy... don't plug it in to the internet!
    – MrWhite
    Sep 8 '14 at 22:28
  • in other words: if there is a door – somebody will be able to open it. Sep 8 '14 at 22:47
  • @w3d is right. Hacking can only be mitigated but can be mitigated to a largely effective degree.
    – closetnoc
    Sep 9 '14 at 1:57
  • 2
    Samba is FTP? Hmm, explain that one. Anyway, not a good idea to expose SMB to the internet in the first place. SCP/SFTP if you want file transfer. Sep 9 '14 at 4:29
  • You can't. There always new methods. Sep 9 '14 at 6:10

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.