![]() |
VOOZH | about |
A LEMP software stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the ENginx web server (which replaces the Apache component of a LAMP stack). The site data is stored in a MySQL-based database, and dynamic content is processed by PHP.
In this guide, weโll get a LEMP stack with PHP 7.4 installed on a CentOS 7 server, using MariaDB as the database management system. MariaDB works as a drop-in replacement for the original MySQL server, which in practice means you can switch to MariaDB without having to make any configuration or code changes in your application.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Software Engineer @ DigitalOcean. Former Seรฑor Technical Writer (I no longer update articles or respond to comments). Expertise in areas including Ubuntu, PostgreSQL, MySQL, and more.
Dev/Ops passionate about open source, PHP, and Linux. Former Senior Technical Writer at DigitalOcean. Areas of expertise include LAMP Stack, Ubuntu, Debian 11, Linux, Ansible, and more.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I have the next error when I type sudo systemctl start nginx.service
Job for nginx.service failed. See โsystemctl status nginx.serviceโ and โjournalctl -xnโ for details.
:(
@dgonzalez: Sounds like there is a typo or syntax error in your Nginx configuration file. To test it, run:
sudo nginx -t
Not all changes are highlighted red in default.conf listing in my nginx config file.
The instructions root and index are carried out into the section server{}, although by default they are found inside the section of location / {}.
Also added try_files $uri $uri/ =404; instruction into location / {}.
I think, instead of the edit file, simpler it will copy the listing of configuration proposed.
I get error: 404 Not Found when I try to access websiteaddress.com/info.php
I put info.php in /usr/share/nginx/html/ via FileZilla.
Itโa all good now. :)
Thanks, d.v.bogdanov - I was stuck on this tutorial for a bit, and your comment helped me fixed the problem! :)
Yeah, thanks d.v.bogdanov and rdebeasi. I completely missed that as well. Be nice if the author could go back and make those changes a little clearer. Otherwise very helpful startup article.
To save some the headache that I went through.
In the line sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm : the el7 is the letter E, the letter L, the Numbr 7
Before sudo yum install nginx will work, you must install EPEL. This can be done with these codes.
wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm
rpm -ivh epel-release-7-0.2.noarch.rpm
Thanks Very much !
works for me all but a small detail that I can not fix โฆ
when I put in the nginx configuration file (/etc/nginx/nginx.conf) about โlisten = /var/run/php-fpm/php-fpm.sock " the web does not work, I get a little clear errorโ
the file โ/etc/nginx/conf.d/default.confโ is well configured with the following "fastcgi_pass unix:/var/run/php-fpm/ php-fpm.sock; " but does not work.
however when I put in the two configuration files that โ127.0.0.1:9000โ if it works
the question is, what can be the problem? in the tutorial I see that you just have to edit what I put, but it may be that I miss something?
thank you very much for your tutorial and help
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.