
80 through the default firewall configuration.
active (running) result in the above output, the MySQL database server is active and running on your server.VALIDATE PASSWORD: Enter Y to enable password strength checks on the database server.Password strength policy: Enter 2 to enable multi-character password usage on the server.Remove anonymous users: Enter Y to remove anonymous users from the database server.Disallow root login remotely: Enter Y to disable remote access to the root database user.Remove test database: Enter Y to delete the default MySQL test database on your server.Reload privileges tables now: Enter Y to reload the MySQL privilege tables and apply your configuration changes.root user.root database user to use a new strong password. Replace Strong@@password123 with your desired password.password with a strong password.root user and enter the password you set earlier when prompted.content_database.dbadmin with a strong password. Replace Strong@@password123 with your desired password.content_database.php-mysql: Enables PHP to connect and interact with the MySQL database server.libapache2-mod-php: Enables the Apache web server to process and run PHP scripts.php-opcache: Enables caching of precompiled PHP scripts in memory for faster execution.php-cli: Enables access to PHP in your server terminal.PHP 8.3.proxy_fcgi: Enables Apache to work as a proxy with PHP-FPM.setenvif: Sets the necessary environment variables to enable connections between Apache and PHP-FPM.www.conf PHP-FPM pool configuration.www.www-data to enable PHP-FPM to use the default web server user profile.pm: Sets the default process manager. The value dynamic enables PHP child processes to dynamically adjust on your server.pm.start_servers: Defines the number of PHP child processes to create at startup. The default value is 2.pm.max_children: Sets the maximum number of PHP child processes that can be active simultaneously. The default value is 5.pm.min_spare_servers: Setsthe minimum number of idle PHP child processes. The default value is 1.pm.max_spare_servers: Specifies the maximum number of idle PHP child processes. The default value is 3.pm.max_requests: Limits the number of requests a PHP child process can handle before it's recycled.mod_proxy_fcgi module to communicate with PHP-FPM using the service UNIX socket or the default TCP port 9000 depending on your pool configuration. In the following steps, set up a new Apache virtual host configuration and connect to the PHP-FPM service using the UNIX socket.app.example.com.conf.app.example.com with your actual domain.80 and serves web contents using your app.example.com domain. Then, all PHP file requests are forwarded to the PHP-FPM process using the /var/run/php/php8.3-fpm.sock UNIX socket. Within the configuration:<VirtualHost *:80>: Enables the virtual host profile to listen for connections on port 80.<Directory /var/www/app.example.com>: Sets the web root directory to deliver web application files.<FilesMatch \.php$>: Forwards all PHP file requests to the PHP-FPM socket /var/run/php/php8.3-fpm.sock using the FastCGI protocol.ErrorLog, CustomLog: Enable custom paths to store the virtual host error and access logs respectively./var/www/app.example.com defined in your configuration.info.php./info.php path to verify that your PHP application information displays.
80 while other LAMP stack components use internal TCP ports such as the MySQL port 3306 and the PHP-FPM port 9000. Follow the sections below to configure the default firewall to allow connections to the default web server port 80 and set up trusted SSL certificates to enable HTTPS connections on port 443.Apache Full profile to enable HTTP and HTTPS connections on the server.app.example.com with your actual domain and admin@example.com with your email.content_database MySQL database to connect with your PHP application and display the message Hello World! Greetings from Vultr when accessed in a web browser.dbadmin you created earlier.dbadmin user password when prompted to access the MySQL console.content_database.messages with two columns, content_id and content to store your data.content_id: Contains numeric values and automatically increments unique data on each new row.content: Holds mixed content data with up to 255 characters.messages table. For example, add a new Hello World! Greetings from Vultr string to the content column.setup.php in your web root directory /var/www/html/app.example.com.content_database and displays data from the content column in the messages table when accessed. When the MySQL database does not contain any records, a No records found message displays or Connection Failed. when the connection to the database server fails.www-data full privileges to your web root directory./setup.php path in your web browser to verify that your PHP application displays the Hello World! Greetings from Vultr string content from your MySQL database.Posted Jun 19, 2025
Guide on installing LAMP stack on Ubuntu 24.04 for Vultr.