1. Judging Apache
To find the httpd path:
PS grep httpd
Results: /usr/local/apache/bin/httpd
grep "Server_config_file"
Result: The configuration file path loaded at compile time can be found httpd.conf
The-v parameter can see the parameters that are configured at compile time
2. Judging Nginx
First execute the command to find the Nginx path.
PS grep Nginx
Results:/usr/local/nginx/sbin/nginx
/usr/local/nginx/sbin/nginx-v
By default in the installation directory conf/nginx.conf
3. Judging MySQL
First execute the command to find the MySQL path
PS grep mysqld
If the mysqld path is
/usr/bin/mysql
Then execute the following command
grep 1 ' Default options ' or /usr/bin/mysql–print-defaults
4, determine the PHP load profile path
(1), can be viewed through PHP function phpinfo, write a file, and then use the URL to access, find "Loaded configuration file" corresponding to the value of the PHP loaded configuration files
(2), if it is a nginx+php configuration, you can also find the PHP execution path
PS grep PHP
For example, the path is/USR/LOCAL/NGINX/SBIN/PHP-FPM
Then execute the following command
grep "Loaded Configuration File"
You can see the PHP loaded configuration file
(3), if it is a apache+mod_php configuration, you can also view the loaded php.ini path in the Apache configuration file. such as Phpinidir "/usr/local/apache/conf/php.ini"
Of course, there is a simple way to search through find.
Such as
Find/-name nginx.confFind /-name php.iniFind /-name My.cnf Find /-name httpd.conf
Linux Simple configuration