Configuring apache and smokeping
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2011
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Configuring apache and smokeping

    Hi,
    I have a fedora30 desktop on a dynamic IP behind a cable modem that I'd like to configure to support apache and specifically smokeping. The problem I'm having I believe is with php-fpm. I've installed and configured it, but trying to access it results in a gateway timeout error. I do see entries in the logs when this fails, so I'm sure I'm at least reaching the desktop successfully.

    The desktop is on a dynamic IP (192.168.9.110) behind a cable modem with a dynamic IP. I've configured port forwarding for port 8027 to forward to port 8027 on the machine itself where apache is listening. I've also configured port 8022 to forward to port 8022 on the desktop to provide ssh access, and can ssh to it successfully.

    I've configured the smokeping.conf apache config to allow any IP to communicate with it for now. I can also reach the default fedora test page successfully.

    What is the minimum apache config that is necessary to work with smokeping without configuring a virtual host? I haven't changed the /etc/httpd/conf/httpd.conf, /etc/httpd/conf.d/ssl.conf and /etc/httpd/conf.d/fcgid.conf files from the default. I've just changed the Listen statement in ssl.conf to use 8022 instead of 80.

    Here is my /etc/httpd/conf.d/smokeping.conf:
    Code:
    <Directory "/usr/share/smokeping" >
      Require local
      Require ip 68.195.193 192.168
    </Directory>
    <Directory "/var/lib/smokeping" >
      Require local
      Require ip 68.195.193 192.168
    </Directory>
    ScriptAlias /smokeping/sm.cgi  /usr/share/smokeping/cgi/smokeping.fcgi
    Alias       /smokeping/images  /var/lib/smokeping/images
    Alias       /smokeping         /usr/share/smokeping/htdocs
    The /etc/httpd/conf.d/fcgid.conf file is also very simple:

    Code:
    AddHandler fcgid-script fcg fcgi fpl
    FcgidIPCDir /run/mod_fcgid
    FcgidProcessTableFile /run/mod_fcgid/fcgid_shm
    The /etc/httpd/conf.d/ssl.conf file is also the default, and includes the SetHandler statement to use php-fpm, I believe:

    Code:
    <IfModule !mod_php5.c>
      <IfModule !mod_php7.c>
        # Enable http authorization headers
        SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
    
        <FilesMatch \.(php|phar)$>
            SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
        </FilesMatch>
      </IfModule>
    </IfModule>
    Here is my /etc/php-fpm.d/www.conf. It is also very much the default.

    Code:
    [www]
    user = apache
    group = apache
    listen = /run/php-fpm/www.sock
    listen.acl_users = apache,nginx
    pm = dynamic
    pm.max_children = 5
    pm.start_servers = 2
    pm.min_spare_servers = 2
    pm.max_spare_servers = 3
    slowlog = /var/log/php-fpm/www-slow.log
    php_admin_value[error_log] = /var/log/php-fpm/www-error.log
    php_admin_flag[log_errors] = on
    php_value[session.save_handler] = files
    php_value[session.save_path]    = /var/lib/php/session
    php_value[soap.wsdl_cache_dir]  = /var/lib/php/wsdlcache
    The /var/log/php-fpm/www-error.log file is empty. After attempting to reach the system remotely, I see the following message in the apache error_log from my remote IP:

    Code:
    [Wed May 15 15:42:17.997621 2019] [fcgid:warn] [pid 14476:tid 139916520441600] [client 68.195.199.42:34118] mod_fcgid: read data timeout in 40 seconds
    I only have four php packages installed:

    Code:
    php-cli-7.3.5-1.fc30.x86_64
    php-7.3.5-1.fc30.x86_64
    php-fpm-7.3.5-1.fc30.x86_64
    php-common-7.3.5-1.fc30.x86_64
    Of course I have restarted both the php-fpm and httpd services. I'm really hoping someone can tell me what I'm doing wrong to cause it to always timeout on an otherwise idle box.

  2. #2
    Join Date
    Aug 2016
    Location
    spring, tx
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Configuring apache and smokeping

    out of curiosity, did you install smokeping via dnf, or from source using the instructions from the smokeping website? I've only ever got smokeping working when i install from source in /opt. and even then some of the config files have wrong entries you have to go in and fix.

    When you say you have a desktop configured to use a dynamic IP (192.168.9.110) do you mean static? to me dynamic means changing... just want to be clear. and am i right to assume you're trying to reach the desktop from outside the LAN the desktop resides in via the cable modem?

    I dont have access to my httpd config files currently, and the working ones i do have are for a centos 7 build (shouldnt really be all that different). but i dont rememeber doing a lot of php config.

  3. #3
    Join Date
    Oct 2011
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Configuring apache and smokeping

    Quote Originally Posted by rexrf
    out of curiosity, did you install smokeping via dnf, or from source using the instructions from the smokeping website? I've only ever got smokeping working when i install from source in /opt. and even then some of the config files have wrong entries you have to go in and fix.
    I've installed it via dnf. I have gotten it working using this method in the past. I think the problem I'm having is with my lack of familiarity with php-fpm, although I'm not sure.

    When you say you have a desktop configured to use a dynamic IP (192.168.9.110) do you mean static? to me dynamic means changing... just want to be clear. and am i right to assume you're trying to reach the desktop from outside the LAN the desktop resides in via the cable modem?
    Yes, thank you. It's a static IP using the private address range. The dynamic IP is the one assigned to the cable modem by his provider. I've set his desktop IP to be static among other dynamic IPs on the network so I can do port forwarding properly.

    I dont have access to my httpd config files currently, and the working ones i do have are for a centos 7 build (shouldnt really be all that different). but i dont rememeber doing a lot of php config.
    I don't know where the real problem with this is. I'd appreciate any input from anyone else who has successfully done this.

Similar Threads

  1. selinux - semodule -r smokeping - failure
    By Tstepnia in forum Using Fedora
    Replies: 0
    Last Post: 26th January 2016, 12:02 AM
  2. [SOLVED]
    smokeping 2.6 on fedora 17
    By neuromante in forum Using Fedora
    Replies: 0
    Last Post: 19th November 2012, 01:39 PM
  3. Configuring Apache
    By AliasM2K in forum Using Fedora
    Replies: 3
    Last Post: 2nd October 2010, 05:35 PM
  4. Smokeping :(
    By pokemon1 in forum Using Fedora
    Replies: 14
    Last Post: 11th November 2008, 12:25 AM
  5. configuring apache
    By cyberakash in forum Servers & Networking
    Replies: 6
    Last Post: 9th February 2007, 08:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •