Learn about Centmin Mod LEMP Stack today
Become a Member

New menu option / motd - common file paths

Discussion in 'Feature Requests & Suggestions' started by ethanpil, Jan 19, 2016.

  1. ethanpil

    ethanpil Active Member

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    1:07 PM
    I find myself coming back to these forums or the centminmod main site looking for common config and log file locations as I dont usually remember... :(


    I think a lot of people may also looking all the time for this information, and with a small change can make things much quicker and easier for a lot of people.

    Perhaps we can add another option 25 or make the motd more useful with a list like this of the paths to important log/config files. what do you think?

    Code:
    CSF Firewall configs:
    /etc/csf
    
    NginX configs:
    /usr/local/nginx/conf
    
    NginX domain content:
    /home/nginx
    
    php.ini
    /usr/local/lib/php.ini
    /etc/centminmod/php.d
    
    php-fpm config:
    /usr/local/etc/php-fpm.conf
    
    php-fpm  logs
    /var/log/php-fpm/www-php.error.log
    /var/log/php-fpm/www-error.log
    
    MariaDB (MySQL) config:
    /etc/my.cnf
    
    MariaDB (MySQL) log
    /var/log/mysqld.log
    
    pure-ftpd configs:
    /etc/pure-ftpd
    
    pure-ftpd log:
    /var/log/pureftpd.log
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,909
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    1:07 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  3. eva2000

    eva2000 Administrator Staff Member

    54,909
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    1:07 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. ethanpil

    ethanpil Active Member

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    1:07 PM
    i know about these links. i thought it would be very convenient to have them in the server for easy reference...
     
  5. Skippy

    Skippy New Member

    25
    11
    3
    May 14, 2015
    Ratings:
    +20
    Local Time:
    1:07 PM
    made this up quickly for you This is untested so might not work.

    usage
    $commondirloc.sh php
    $commondirloc.sh nginx
    $commondirloc.sh mariadb
    $commondirloc.sh cfs


    commondirloc.sh
    Code:
    #!/bin/bash
    
    function php_file_info
    {
        echo "*************************************************"
        echo "* PHP File Locations"
        echo "*************************************************"
        echo "/etc/init.d/php-fpm"
        echo "/usr/local/etc/php-fpm.conf"
        echo "/var/log/php-fpm/www-error.log"
        echo "/var/log/php-fpm/www-php.error.log"
    }
    
    function nginx_file_info
    {
        echo "*************************************************"
        echo "* Nginx File Locations"
        echo "*************************************************"
        echo "/etc/init.d/nginx"
        echo "/usr/local/nginxbackup/"
        echo "/usr/local/nginx/conf/conf.d/virtual.conf"
        echo "/usr/local/nginx/conf/staticfiles.conf"
        echo "/usr/local/nginx/conf/php.conf"
        echo "/usr/local/nginx/conf/ssl/"
        echo "/usr/local/nginx/html"
        echo "/home/nginx/domains/"
        echo "/usr/local/nginx/conf/conf.d/"
    }
    
    function mariadb_file_info
    {
        echo "*************************************************"
        echo "* MariaDB File Locations"
        echo "*************************************************"
        echo "/root/.my.cnf"
        echo "/etc/my.cnf"
        echo "/var/lib/mysql"
    }
    
    function cfs_file_info
    {
        echo "*************************************************"
        echo "* CFS Firewall File Locations"
        echo "*************************************************"
        echo "/etc/csf/csf.conf"
        echo "/etc/csf/"
    }
    
    case $1 in
        1|php)
            php_file_info
            exit
        ;;
        2|nginx)
            nginx_file_info
            exit
        ;;
        3|mariadb)
            mariadb_file_info
            exit
        ;;
        4|cfs)
            cfs_file_info
            exit
        ;;
    esac
     
  6. ethanpil

    ethanpil Active Member

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    1:07 PM
    Thanks this is similar to what I suggesting as an addition to the core menu. I think it would be ideal to use the bash vars from centmin.sh whereever possible to stay consistent, like
    $NGINXDIR
    $NGINXCONFDIR
    $PHPFPMDIR
    etc..

    Adding this to default centminmod install would save those of us with lesser memories from having to hunt every time....
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,909
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    1:07 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nice @Skippy i was thinking of just adding more command shortcuts as don't want to unnecessarily populate centmin.sh menu with additional options as a user's SSH client window size also needs to be taken into account or another item would be to start rolling out a /usr/bin/cm command which can tie things together
     
  8. ethanpil

    ethanpil Active Member

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    1:07 PM
    I think either way is good. Either to add to menu (or maybe reorganize with submenus)
    Or make a list of the available commands in motd shown after login... Something like this page: Command Shortcuts - CentminMod.com LEMP Nginx web stack for CentOS

    centmin - show main menu
    centminpaths - show paths to common config and log files
    phpedit
    etc

    The idea, as I wrote before is to help us users save time not having to search this site to find essential and commonly used information..
     
  9. eva2000

    eva2000 Administrator Staff Member

    54,909
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    1:07 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    most like end up doing it as a /usr/bin/cm command with options .. will see :)