Install a web stack (Nginx, PHP, MySQL) on Ubuntu

Prepare a clean Ubuntu VPS to host PHP websites.

Advanced 10 Oct 2026 1 min read Onimhost Support Team 0 views
  1. Update the system: apt update && apt upgrade -y.
  2. Install the packages: apt install nginx mysql-server php-fpm php-mysql -y.
  3. Secure MySQL: mysql_secure_installation.
  4. Put your site in /var/www/site and create a server block in /etc/nginx/sites-available.
  5. Test and reload: nginx -t && systemctl reload nginx.

Tip: Add a free certificate afterwards with certbot --nginx.

Share

Get Exclusive Offers & Promotions!

Stay updated with the latest deals, discounts, and special promotions.

Check Promotions

Chat with us