Hướng dẫn how to enable php in apache2 ubuntu - cách bật php trong apache2 ubuntu
Show Last updated on May 24th, 2020 In this guide we will install PHP and configure it to work with the Apache web server on Ubuntu Server 20.04. PrerequisitesYou should use a non-root user account as explained in the Ubuntu 20.04 Initial Server Setup. You should also have Apache already installed and be able to access a test web page in your browser as explained in our guide Installing Apache on Ubuntu 20.04 Server with Virtual Hosts. 1. Install PHPLet’s begin by updating the package lists and installing PHP on Ubuntu 20.04. Below we have two commands separated by
Press
2. Test PHPOnce the package has finished installing, we can test PHP in the command line.
If PHP installed correctly, you should see something similar below:
Great! Now, let’s test PHP for Apache. /var/www/html/info.ph
Save and exit (press We
can now load this file in the browser by going to Tip: If you don’t know you IP, you can find out with:
Below we can see the PHP info page is working correctly. Once you’ve confirmed PHP is working correctly, it’s important to delete
3. Configure PHP (Optional)If you plan on uploading files larger than 2MBs through WordPress or similar, you will need to alter the PHP config file and set the max upload size. What Next?Now that you have PHP up and running, you can begin setting up a MySQL database server and phpMyAdmin.
Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie. p.s. I increased my AdSense revenue by 200% using AI 🤖. Read my Ezoic review to find out how. Ubuntu 20.04 Web Server Guides
|