The LAMP stack is a combination of open-source software for hosting dynamic websites: Linux as the operating system, Apache as the web server, MySQL or MariaDB as the database, and PHP as the programming language. Perl and Python are sometimes counted in the final letter.
Why it matters
LAMP is the foundation of a huge number of websites, including most WordPress installations and many shared hosting plans. It is well documented, inexpensive and supported by control panels. When a site shows "Error establishing a database connection" or a blank page, knowing which layer failed (Apache, PHP or the database) narrows the cause quickly.
A request flows through the layers in order: Apache receives it, hands PHP files to the PHP handler, PHP queries the database, and the result becomes HTML.
Example
sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql
systemctl status apache2 mariadb
Place a file at /var/www/html/info.php containing <?php phpinfo(); to test PHP, then delete it, because it exposes server details.
Common mistakes
- Running the database and web server on one small machine with no memory limits.
- Leaving a test file such as
phpinfo.phppublicly available. - Using default database passwords.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.