Want to subscribe to topics you're interested in?
Become a Member

Can't reach my server in the office from same IP

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by tomtom, Jun 17, 2016.

Tags:
  1. tomtom

    tomtom New Member

    4
    1
    3
    Jun 17, 2016
    Ratings:
    +1
    Local Time:
    1:02 AM
    Hello,

    First of all, thank you for centminmod, I really like it.

    We have got a php script on our server, to manage our phone calls, in a separately vhost.
    If we are using it from multiple computer and multiple mobile devices in the same time, from the same IP ADDRESS, the website stops loading and can't load our website from all devices for some minutes, but I can ping, and traceroute the server.

    After some minutes later, I can reach the website again, but If trying to load from multiple device, stops working again.

    I read about limit_req but isn't set in the vhost file.

    Have you got any idea regarding that?

    Maybe a nginx flood config, but I don't know..

    Best Regards,

    Tamas
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    9:02 AM
    Nginx 1.13.x
    MariaDB 5.5
  3. tomtom

    tomtom New Member

    4
    1
    3
    Jun 17, 2016
    Ratings:
    +1
    Local Time:
    1:02 AM
    Dear eva2000!

    Thank you for your reply!

    Of course, I have added my ip address with csf -a.

    I'm trying to access by http (call.mydomain.com)

    Nothing in the error logs..

    I'm not behind any proxy, trying to access from my office.

    We have got a router in bridge mode and an apple wifi router for use the internet on all devices.

    Best Regards,

    Tamas
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    9:02 AM
    Nginx 1.13.x
    MariaDB 5.5
    checked /var/log/messages ?
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    9:02 AM
    Nginx 1.13.x
    MariaDB 5.5
    also try nginx and php-fpm debug modes

    If you have a lot of free disk space, you can enable debug nginx version and compile a nginx debug build of nginx via centmin.sh option NGINX_DEBUG=y centminmod/centmin.sh at 123.08stable · centminmod/centminmod · GitHub

    You can place the option in persistent config /etc/centminmod/custom_config.inc outlined at centminmod.com/upgrade.html#persistent so place in file /etc/centminmod/custom_config.inc
    Code:
    NGINX_DEBUG=y
    then recompile nginx via centmin.sh menu option 4 and then in your nginx error_log directive add debug option A debugging log and restart nginx and check logs

    They will be very very very verbose and lot alot to disk usage logged to error logs, so ensure you have a lot of disk free space.

    You can minimise this by limiting it to specific ip based client connections too
    After debugging is done, reverse the debug now by setting NGINX_DEBUG=n and recompile Nginx again

    What's output for these commands - post output wrapped in CODE tags
    Code (Text):
    php -v

    Code (Text):
    php -m

    Code (Text):
    php-config --configure-options


    Examples with strace below:
    With gdb backtrace and PHP debug compiled mode where centmin.sh has a PHPDEBUGMODE variable which you can set to PHPDEBUGMODE=y and recompile php via centmin.sh menu option 5 to enable debug mode for PHP-FPM. After troubleshooting set PHPDEBUGMODE=n and recompile php via centmin.sh menu option 5 again to disable debug mode.
    Code:
    PHPDEBUGMODE=n # --enable-debug PHP compile flag
    Centmin Mod is provide as is, so short of scripted related bugs or issues, any further optimisation to the web stack components - nginx, php-fpm, mariadb mysql, csf firewall etc or web app specific configurations are left to the Centmin Mod user to deal with. So I do not provide any free support for such.

    You'll need to tune your PHP-FPM settings and this is left up to end user to do but here's a thread for starters to enable php status page output outlined at PHP-FPM - CentminMod.com LEMP Nginx web stack for CentOS and PHP-FPM - pm.max_children | Centmin Mod Community which outlines the official PHP-FPM config documentation as well.
     
  6. tomtom

    tomtom New Member

    4
    1
    3
    Jun 17, 2016
    Ratings:
    +1
    Local Time:
    1:02 AM
    var/log/messages containts some lines, like this:

    Code:
    Jun 17 10:48:38 CentOS-72-64-minimal kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=90:1b:0e:93:51:bb:00:31:46:0d:3b:84:08:00 SRC=91.197.232.42 DST=138.201.60.216 LEN=40 TOS=0x00 PREC=0x00 TTL=248 ID=54321 PROTO=TCP SPT=55575 DPT=3389 WINDOW=65535 RES=0x00 SYN URGP=0
    But doesn't contain my office ip address.
     
  7. ediz

    ediz New Member

    3
    1
    3
    Jun 1, 2017
    Ratings:
    +1
    Local Time:
    2:02 AM
    @tomtom did you solve this problem? how?