Organizing the Nginx, MySQL and PHP installation directories and configuration file paths in LNMP

888u

Last update at :2024-03-21,Edit by888u

The LNMP script will install Nginx, MySQL and PHP by default. Sometimes we need to modify the configuration of these software, so today this site will sort out the Nginx, MySQL and PHP installation directories and configuration file paths.

1. LNMP software installation path

To install and use LNMP, the software we need to know includes Nginx, MySQL and PHP, as well as website directories, log directories, etc., which are organized as follows:

Nginx directory: /usr/local/nginx/ MySQL directory: /usr/local/mysql/ The directory where the MySQL database is located: /usr/local/mysql/var/ PHP directory: /usr/local/php/ Default website directory: /home/wwwroot/default/ Nginx log directory:/home/wwwlogs/

2. LNMP software configuration file path

In daily operation and maintenance, we often need to modify the configuration files of these software, such as Nginx's conf file, PHP's php.ini file, MySQL's my.cnf file, etc. The paths of these configuration files are organized as follows:

Nginx main configuration (default space) file: /usr/local/nginx/conf/nginx.conf Added space configuration file: /usr/local/nginx/conf/vhost/domain name.conf MySQL configuration file:/etc/my.cnf PHP configuration file: /usr/local/php/etc/php.ini php-fpm configuration file:/usr/local/php/etc/php-fpm.conf

After we modify the configuration file, we generally need to restart the corresponding service for the configuration to take effect. The command is as follows:

lnmp {nginx|mysql|mariadb|php-fpm|pureftpd} restart

Or restart LNMP directly:

lnmp restart

If you haven’t used LNMP scripts yet, you can also read the previous introduction: "One-click installation of LNMP environment on Linux, supporting CentOS/Ubuntu/Debian"

Recommended site searches: registered domain name, US free virtual host, Alibaba Cloud free virtual host, domain name registration website, Korean cheap server, overseas server rental price, IP search, server rental US high defense, Hong Kong vps host rental, United States Server and Japanese server

Organizing the Nginx, MySQL and PHP installation directories and configuration file paths in LNMP

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码