Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to Find MySQL, PHP and Apache Configuration Files:awk and sed  (Read 1721 times)

0 Members and 1 Guest are viewing this topic.

sibij

  • Guest
Check configuration file of mysql, php, nginx
Code: [Select]
$ mysql --help | awk '$0~/Default options/{getline;print}'
/etc/my.cnf ~/.my.cnf
$ mysqladmin --help | awk '$0~/Default options/{getline;print}'
/etc/my.cnf ~/.my.cnf

Check PHP Configuration File.
Code: [Select]
$ php -i | awk '$0~/^Loaded Configuration File/{print $NF}'
/etc/php.ini

Check Nginx Configuration File.

$ nginx -V 2>&1 | sed -r -n 's@.*conf-path=(.*) --error.*@\1@p'
/etc/nginx/nginx.conf