Installing a web server (Nginx, PHP, MySQL)
Set up a basic LEMP stack on Ubuntu to host websites.
On a fresh Ubuntu server:
apt update
apt install -y nginx mariadb-server php-fpm php-mysql php-curl php-xml php-mbstring php-zip php-gd
mysql_secure_installationThen:
- Put your site in
/var/www/example.comand create an Nginx server block for it in/etc/nginx/sites-available/. - Enable it with a link in
sites-enabled, test withnginx -tand reload withsystemctl reload nginx. - Point your domain to the server: see Pointing a domain to your server.
- Add free HTTPS: see Free SSL with Certbot.
Prefer a control panel, or want us to run the server for you? Look at managed services, or open a ticket to the Managed Department.
Learn step by step in the free Getting started with a VPS course.