I want to know if I am missing something or no.
I have: 512MB Ram 20GB SSD Disk Singapore 1 LEMP on Ubuntu 14.04 I am building a simple PHP application.
I have done:
LEMP one-click app installation
initial server setup I wen to this link and applied all the things in the tutorial (Create new user, gave it Root Privileges, changed ssh port, disabled root login).
key-based authentication After doing that I have disabled login using password
installed ufw firewall I have closed all incoming and outgoing ports. and the I have opened the ones I need until this post and those are: 2222/tcp(ssh port and sftp) 80/tcp 2222/tcp (v6) (ssh port and sftp) 80/tcp (v6)
I will be openning more ports when needed. For example if I need to use something that uses port XXXX then I will open that.
Now my question is:
And the most important question, Am I missing any other setup before going live?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
- In step 4, Do I need to open more ports In the firewall? Some ports that are necessary to be open before my website goes live.
The only ports you need open to serve a website are 80 and 443 if you have SSL enabled.
- In step 5, Do I need to disable root in mysql or it does not matter? Or just using the other username with all privileges in my application is fine?
You can keep the root MySQL user, but your application should use its own user account that is limited to one database or as many database as it needs (the root user has access to everything). See How To Create a New User and Grant Permissions in MySQL | DigitalOcean.
Hi!
If you only plan on serving a plain web page over HTTP, then there is no need to open any other ports. If you add HTTPS encryption, than you’ll also need to open port 443.
If the root MySql account is password protected and MySql is only listening on the localhost (i.e. not accepting connections from the internet on port 3306), you should be alright.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.