Home > Article > Backend Development > Linux View the directory where nginx, apache, php, php-fpm, mysql and configuration items are located
The content of this article is to view the directory where nginx, apache, php, php-fpm, mysql and configuration items are located in linux. Now I share it with you. Friends in need can refer to it
Many times it will Log in to an unfamiliar server;
When the environment needs to be adjusted;
There is really nothing to start with; all the equipment depends on it;
I am blind and looking for configuration items everywhere;
Fortunately, I There is a note for this;
You can summarize it first;
Most of the time, you use which to get the directory first;
and then get the configuration item location;
which mysql /usr/bin/mysql /usr/bin/mysql --help | grep -A1 'Default options'
which php /usr/local/apache2/php/bin/php php -i | grep "Loaded Configuration File"
ps -ef | grep 'http' /usr/local/apache2/bin/httpd -V | grep 'SERVER_CONFIG_FILE'Copy The spelling is: /usr/local/apache2/conf/httpd.conf
##
ps -ef | grep 'nginx'Bash
If not, execute it according to the nginx location in the picture above
/www/server/nginx/sbin/nginx -t
ps -ef | grep 'php-fpm'Bash
The configuration file path can be seen at a glance;
The above is the detailed content of Linux View the directory where nginx, apache, php, php-fpm, mysql and configuration items are located. For more information, please follow other related articles on the PHP Chinese website!