Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-05-16, 03:52:55

Author Topic: 502 Bad Gateway  (Read 8980 times)

0 Members and 1 Guest are viewing this topic.

Offline rizwan65

  • Junior Member
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
502 Bad Gateway
« on: 2013-08-13, 12:52:16 »
Just installed Kloxo-MR
Tried to access webmail and presented with this error

502 Bad Gateway
nginx/1.5.2

And
please let me know if Kloxo-MR could be used on production server or it is just in testing phase

Rizwan
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: 502 Bad Gateway
« Reply #1 on: 2013-08-13, 13:40:49 »
Inform here 'sh /script/sysinfo'.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline prandah

  • Senior Member
  • *
  • Posts: 344
  • Karma: +0/-0
    • View Profile
    • https://www.bowo.name
Re: 502 Bad Gateway
« Reply #2 on: 2013-08-13, 18:51:02 »
i use klxo mr on my shared hosting :D
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline rizwan65

  • Junior Member
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: 502 Bad Gateway
« Reply #3 on: 2013-08-14, 00:38:20 »
A. Kloxo-MR: 6.5.0.f-2013081208

B. OS: CentOS release 6.4 (Final) i686

C. Apps:
   1. MySQL: mysql-5.5.29-1.el6.i686
   2. PHP: php53u-5.3.27-1.ius.el6.i686
   3. Httpd: --uninstalled--
   4. Lighttpd: --uninstalled--
   5. Nginx: nginx-1.5.2-1.el6.i686
   6. Qmail: qmail-toaster-1.03-1.3.27.mr.el6.i686
      - with: courier-imap-toaster-4.1.2-1.3.14.mr.el6.i686
   7. Dns: bind-9.9.3-4.P2.el6.i686

D. Php-type (for Httpd/proxy): mod_php_ruid2

E. Memory:
                total       used       free     shared    buffers     cached
   Mem:          1024        634        389          0          0        256
   -/+ buffers/cache:        377        646
   Swap:         2048          0       2047
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: 502 Bad Gateway
« Reply #4 on: 2013-08-14, 00:43:46 »
Hmmm. Still using ruid2.

Because already using nginx but php-type still ruid2, try change to 'apache' on 'switch applications' and 'php-fpm_event' on 'webserver config'. And then, if you want, change back to nginx.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline rizwan65

  • Junior Member
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: 502 Bad Gateway
« Reply #5 on: 2013-08-14, 01:15:35 »
Thanks for your reply
I have changed to apache and php-fpm_event and it worked fine
but when cgain I changed back to nginx same error
502 Bad Gateway
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: 502 Bad Gateway
« Reply #6 on: 2013-08-14, 01:31:05 »
Yes, I am wrong. Forgot something for nginx config.

Change '/home/nginx/conf/globals/php-fpm.conf' and '/usr/local/lxlabs/kloxo/file/nginx/conf/globals/php-fpm.conf' with:

Code: [Select]
   ### MR -- just enough remove # below for enable nginx cache
    #fastcgi_cache fcache;
    fastcgi_cache_valid 200 1h;
    fastcgi_cache_valid 301 1h;
    fastcgi_cache_valid 302 1h;
    fastcgi_cache_valid any 1m;

    ## MR - increasing upload size to 64M (declare inside 'location /' not work
    client_max_body_size 64M;
    client_body_buffer_size 128k;

    fastcgi_connect_timeout 180s;
    fastcgi_send_timeout 180s;
    fastcgi_read_timeout 180s;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 8 128k;

    ### MR -- must be using nginx with including ngx_purge_cache
    ### must be using special nginx (nginx with ngx_purge_cache include
    location ~ /purge(/.*) {
        ### MR -- just enough remove # below for enable purge_cache
        #proxy_cache_purge pcache "$scheme://$host$1$request_method";
        allow 127.0.0.1;
        deny all;
    }

    ### MR -- for userdir (access with http://ip/~user
    location ~ ^/~([^/]+)/(.+.php)$ {
        if (!-f /home/$1/public_html/$2) {
            rewrite ^ 404;
        }
   
        alias '/home/$1/public_html/$2';

        #fastcgi_pass 127.0.0.1:$fpmport;
        fastcgi_pass unix:/home/php-fpm/sock/$user.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
 
    }

    ### MR -- for userdir (access with http://ip/~user
    location ~ ^/~(.+?)(/.*)?$ {
        alias '/home/$1/public_html$2';

        autoindex on;
    }

    location ~ .php$ {
        #include fastcgi_params;

        #fastcgi_pass 127.0.0.1:$fpmport;
        fastcgi_pass unix:/home/php-fpm/sock/$user.sock;
        fastcgi_index  index.php;

        fastcgi_param  REDIRECT_STATUS 200;
        fastcgi_split_path_info ^(.+.php)(/.+)$;

        fastcgi_param  SCRIPT_FILENAME    $rootdir$fastcgi_script_name;
        fastcgi_param  PATH_INFO          $fastcgi_path_info;
        fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_path_info;
 
        fastcgi_param  QUERY_STRING       $query_string;
        fastcgi_param  REQUEST_METHOD     $request_method;
        fastcgi_param  CONTENT_TYPE       $content_type;
        fastcgi_param  CONTENT_LENGTH     $content_length;
 
        fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
        fastcgi_param  REQUEST_URI        $request_uri;
        fastcgi_param  DOCUMENT_URI       $document_uri;
        fastcgi_param  DOCUMENT_ROOT      $document_root;
        fastcgi_param  SERVER_PROTOCOL    $server_protocol;
 
        fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
        fastcgi_param  SERVER_SOFTWARE    nginx;
 
        fastcgi_param  REMOTE_ADDR        $remote_addr;
        fastcgi_param  REMOTE_PORT        $remote_port;
        fastcgi_param  SERVER_ADDR        $server_addr;
        fastcgi_param  SERVER_PORT        $server_port;
        fastcgi_param  SERVER_NAME        $server_name;

        fastcgi_param  PHP_ADMIN_VALUE    'sendmail_path=/usr/sbin/sendmail -t -i';
        fastcgi_param  PHP_ADMIN_VALUE    'sendmail_from=$domain';
    }

    location / {
        limit_conn addr 25;

        try_files $uri $uri/ /index.php;
    }
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline rizwan65

  • Junior Member
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: 502 Bad Gateway
« Reply #7 on: 2013-08-14, 02:14:20 »
Thanks Mustafa
It worked now
What you think could we use Kloxo-MR on production server
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: 502 Bad Gateway
« Reply #8 on: 2013-08-14, 02:36:14 »
I have many servers as production servers (certain as share-hostings) using Kloxo-MR (using Kloxo official before). So, it's your choice.

It's ok for private servers but need better knowledge for share-hosting.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline befree22

  • Valuable Member
  • *
  • Posts: 95
  • Karma: +0/-1
    • View Profile
Re: 502 Bad Gateway
« Reply #9 on: 2014-03-05, 15:04:15 »
I'm getting same 502 gateway error.

A. Kloxo-MR: 6.5.0.f-2014020301

B. OS: CentOS release 6.5 (Final) x86_64

C. Apps:
 1. MySQL: mysql-5.5.34-1.el6.x86_64
 2. PHP: --uninstalled--
 3. Httpd: --uninstalled--
 4. Lighttpd: --uninstalled--
 5. Nginx: nginx-1.5.10-2.el6.x86_64
 6. Qmail: qmail-toaster-1.03-1.3.35.mr.el6.x86_64
 - with: courier-imap-toaster-4.1.2-1.3.14.mr.el6.x86_64
 7. Dns: bind-9.9.5-1.el6.x86_64

D. Php-type (for Httpd/proxy): mod_php_ruid2

E. Memory:
 total used free shared buffers cached
 Mem: 4096 371 3724 0 0 171
 -/+ buffers/cache: 199 3896
 Swap: 1024 0 1024
« Last Edit: 2014-03-05, 15:17:45 by befree22 »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: 502 Bad Gateway
« Reply #10 on: 2014-03-05, 16:13:20 »
I'm getting same 502 gateway error.

A. Kloxo-MR: 6.5.0.f-2014020301

B. OS: CentOS release 6.5 (Final) x86_64

C. Apps:
 1. MySQL: mysql-5.5.34-1.el6.x86_64
 2. PHP: --uninstalled--
 3. Httpd: --uninstalled--
 4. Lighttpd: --uninstalled--
 5. Nginx: nginx-1.5.10-2.el6.x86_64
 6. Qmail: qmail-toaster-1.03-1.3.35.mr.el6.x86_64
 - with: courier-imap-toaster-4.1.2-1.3.14.mr.el6.x86_64
 7. Dns: bind-9.9.5-1.el6.x86_64

D. Php-type (for Httpd/proxy): mod_php_ruid2

E. Memory:
 total used free shared buffers cached
 Mem: 4096 371 3724 0 0 171
 -/+ buffers/cache: 199 3896
 Swap: 1024 0 1024
I'm getting same 502 gateway error.

A. Kloxo-MR: 6.5.0.f-2014020301

B. OS: CentOS release 6.5 (Final) x86_64

C. Apps:
 1. MySQL: mysql-5.5.34-1.el6.x86_64
 2. PHP: --uninstalled--
 3. Httpd: --uninstalled--
 4. Lighttpd: --uninstalled--
 5. Nginx: nginx-1.5.10-2.el6.x86_64
 6. Qmail: qmail-toaster-1.03-1.3.35.mr.el6.x86_64
 - with: courier-imap-toaster-4.1.2-1.3.14.mr.el6.x86_64
 7. Dns: bind-9.9.5-1.el6.x86_64

D. Php-type (for Httpd/proxy): mod_php_ruid2

E. Memory:
 total used free shared buffers cached
 Mem: 4096 371 3724 0 0 171
 -/+ buffers/cache: 199 3896
 Swap: 1024 0 1024
If using nginx or lighttpd or hiawatha (exist in 6.5.1) alone (that mean not their proxy), try switch to apache first and then change php-type to php-fpm_worker/_event. After that, you can change back to nginx.

It's because Kloxo-MR confuse about related to php. You see in sysinfo, Kloxo-MR not inform your php version.

That it.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline befree22

  • Valuable Member
  • *
  • Posts: 95
  • Karma: +0/-1
    • View Profile
Re: 502 Bad Gateway
« Reply #11 on: 2014-03-11, 20:57:15 »
It worked after applying your fix ==> Switch Program to apache first and then change php-type to php-fpm_worker/_event in Webserver Config. After that, you can change back to nginx.

I did have to reinstall Nginx though.

Thanks

Offline befree22

  • Valuable Member
  • *
  • Posts: 95
  • Karma: +0/-1
    • View Profile
Re: 502 Bad Gateway
« Reply #12 on: 2014-03-12, 14:45:08 »
Yesterday, I tried logging into Kloxo-MR panel but I have no access -- "unable to connect to server" error.

It seems like httpd was uninstalled and isn't working now. I never uninstalled httpd. Could you help me figure out why httpd was removed and fix Kloxo-MR login access?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: 502 Bad Gateway
« Reply #13 on: 2014-03-12, 14:50:29 »
Hi,

Kloxo-MR not using httpd (aka apache) for their panel but hiawatha.

If you find "unable to connect to server" look like something wrong with mysql. Try 'sh /script/restart'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline xamer

  • Valuable Member
  • *
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: 502 Bad Gateway
« Reply #14 on: 2015-01-16, 09:58:24 »
I've got the same problem 502 error on nginx server.

I update Kloxo 6.5 to KloxoMR7 and that problem appears. i was trying to fix ==> "Switch Program to apache first and then change php-type to php-fpm_worker/_event in Webserver Config". After that, I changed back to nginx and 502 error stays.
Also i used:
sh /script/fixweb
sh /script/fix-chownchmod

and finally helped
sh /script/fixweb-all
« Last Edit: 2015-01-16, 14:20:20 by xamer »

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.083 seconds with 22 queries.

web stats analysis