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-04-27, 12:14:40

Author Topic: bagaimana cara setting nginx untuk problem 502 Gateway?  (Read 3281 times)

0 Members and 1 Guest are viewing this topic.

Offline redpages

  • Master
  • **
  • Posts: 372
  • Karma: +0/-0
    • View Profile
Dear all,
Ada problem di website saya yang menggunakan wordpress multisite. Jika pasang plugins yang meng'grap' komentar terakhir dari site network maka website menjadi error : 502 Gateway.
Saya sudah otak-atik konfigurasi nginx.conf, awalnya bisa, tapi setelah "back" kembali ke layar sebelumnya website menjadi eror lagi.

Sysinfo:
Quote
A. Kloxo-MR: 6.5.0.f-2013091901

B. OS: CentOS release 5.9 (Final) i686

C. Apps:
   1. MySQL: mysql55-5.5.33-1.ius.el5
   2. PHP: php54-5.4.19-1.ius.el5
   3. Httpd: httpd-2.2.25-1.el5
   4. Lighttpd: --uninstalled--
   5. Nginx: nginx-1.5.5-1.el5
   6. Qmail: qmail-toaster-1.03-1.3.27.mr.el5
      - with: courier-imap-toaster-4.1.2-1.3.14.mr.el5
   7. Dns: djbdns-1.05-17.3.mr.el5

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

E. Memory:
                total       used       free     shared    buffers     cached
   Mem:          1010        967         42          0        102        458
   -/+ buffers/cache:        406        604
   Swap:          509          3        505


Konfigurasi /etc/nginx/nginx.conf vps spt ini :
Quote
user nginx;

worker_processes 4;
worker_rlimit_nofile 400000;

pid /var/run/nginx.pid;

events {
    worker_connections 2048;

    use epoll;
}


http {
    add_header Cache-Control public;

    server_names_hash_max_size 2048;
    server_names_hash_bucket_size 1024;

    types_hash_bucket_size 128;
    types_hash_max_size 4096;
    map_hash_bucket_size 64;

       fastcgi_buffers 256 16k;
       fastcgi_buffer_size 64k;
   fastcgi_connect_timeout 600;
   fastcgi_send_timeout 300;
   fastcgi_read_timeout 300;
   fastcgi_max_temp_file_size 0;

    client_header_buffer_size 8k;
    client_header_timeout 180s;
    client_body_timeout 180s;
    send_timeout 180s;

    client_max_body_size 64M;
    client_body_buffer_size 128k;

    sendfile        on;
    tcp_nopush      on;
    tcp_nodelay     on;
    server_tokens   on;

    include '/etc/nginx/conf.d/*.conf';
}

Mohon pencerahannya

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: bagaimana cara setting nginx untuk problem 502 Gateway?
« Reply #1 on: 2014-04-21, 08:19:19 »
Error 502 adalah kesalahan umum. Rasanya lebih terkait pada php-fpm dan (memory tidak cukup; children kurang) atau apache (.htaccess salah).

Coba saja pada 'php config' naikkan nilai memory limit dan enable dulu display error untuk lebih tahu lebih lanjut penyebabnya.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline redpages

  • Master
  • **
  • Posts: 372
  • Karma: +0/-0
    • View Profile
Re: bagaimana cara setting nginx untuk problem 502 Gateway?
« Reply #2 on: 2014-04-21, 18:37:04 »
Jika memakai nginx dan php fpm seperti dalam kasus diatas cara menaikkan memory limit dan menambahkan children di file mana  aja ya?

terima kasih atas pencerahannya

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine

Page created in 0.054 seconds with 19 queries.

web stats analysis