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. 2017-11-07, 20:58:39

Author Topic: Om, Cara nginxproxy + load balancing??  (Read 1688 times)

0 Members and 1 Guest are viewing this topic.

Offline hieppies

  • Junior Member
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Om, Cara nginxproxy + load balancing??
« on: 2016-06-12, 13:55:33 »
Om, nginxproxy biar bisa load balancing gimana??
Ane belajar ngoprek dari cakep sampe jelek,  tetep aja ga jalan..  :'( :'(

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Om, Cara nginxproxy + load balancing??
« Reply #1 on: 2016-06-12, 14:32:54 »
Memangnya pakai berapa server untuk load-balancing?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline hieppies

  • Junior Member
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Om, Cara nginxproxy + load balancing??
« Reply #2 on: 2016-06-12, 15:07:49 »
sementara masih 2 serper, om...  :)
emang minimal harus brapa, Om??

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Om, Cara nginxproxy + load balancing??
« Reply #3 on: 2016-06-12, 15:11:39 »
Konfigurasi server yang mau anda bayangkan bagaimana?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline hieppies

  • Junior Member
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Om, Cara nginxproxy + load balancing??
« Reply #4 on: 2016-06-12, 15:20:41 »
Alurnya gini, om...

2 Serper:  srv 1 dan srv 2.

antara srv 1 dan srv 2 di load balancing, trus config load balancingnya ada di srv 1
Bisa ga, Om???

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Om, Cara nginxproxy + load balancing??
« Reply #5 on: 2016-06-12, 15:32:20 »
Pengaturan proxy ada di /opt/configs/nginx/conf/globals. Ada beberapa file antara lain proxy_standard.conf. Anda copy masing-masing ke custom file, misalnya copy proxy_standard.conf ke custom.proxy_standard.conf. Sesuaikan isi masing-masing custom file ini. Jika sudah, jalankan 'sh /script/fixweb; sh /script/restart-web -y'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline hieppies

  • Junior Member
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Om, Cara nginxproxy + load balancing??
« Reply #6 on: 2016-06-12, 15:34:11 »
Oke om, ane eksekusi sebentar..  :D

Offline hieppies

  • Junior Member
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Om, Cara nginxproxy + load balancing??
« Reply #7 on: 2016-06-12, 15:39:53 »
Oh ya om,

Kan config ane buat nginx load balance kyk gini, Om:

upstream balancing {
   server ipaddress01:80 weight=3;
   server ipaddress02:80;
}
#Diatas server {

trus ditaruh di bawah location, misal proxy_pass http://balancing

trus naruh confignya disitu gimana, Om??

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Om, Cara nginxproxy + load balancing??
« Reply #8 on: 2016-06-12, 15:41:26 »
Coba dulu saja.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline hieppies

  • Junior Member
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Om, Cara nginxproxy + load balancing??
« Reply #9 on: 2016-06-12, 15:49:45 »
Udah ane coba oprek,

yg conf upstream, ane taruh di /etc/nginx/conf.d/default.conf atas sendiri...

trus di proxy_standart.conf, config:
proxy_pass http://127.0.0.1:30080/;
ane ganti:
proxy_pass http://balancing

Jadi kacau Om... ;D ;D
X-micro-cachenya jadi Miss Miss Miss Miss diheadernya..

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Om, Cara nginxproxy + load balancing??
« Reply #10 on: 2016-06-12, 15:57:09 »
Yang dimaksud load-balancing di nginx sebenarnya adalah nginx ke nginx.

Jadi dalam kasus anda, anda pilih nginx (bukan nginx-proxy) di server 1. Kemudian copy proxy_*.conf ke custom.php-fpm_*.conf. Begitu.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline hieppies

  • Junior Member
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Om, Cara nginxproxy + load balancing??
« Reply #11 on: 2016-06-12, 16:01:55 »
Owwwh gitu toh, Om...
jadi Ga bisa pake nginxproxy ya, Om.. hahahahaha...

Makasih banyak Om..  ;D ;D ;D ;D

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Om, Cara nginxproxy + load balancing??
« Reply #12 on: 2016-06-12, 16:06:16 »
Misalnya anda setup domain.com di server1 dan sub.domain.com di server2 dimana sub.domain.com adalah website yang berisi contentnya.

Maka anda pakai nginx di server1 dan nginx (bisa yang lain) di server2.

Karena anda pilih nginx di server1 dimana artinya pakai php-fpm maka perlu diambil isi dari proxy dan disalin ke custom.php-fpm. Ubah isi file custom ini agar sesuai dengan tujuan load-balancing.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline hieppies

  • Junior Member
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Om, Cara nginxproxy + load balancing??
« Reply #13 on: 2016-06-12, 16:13:37 »
iya om,
kan diglobal itu ada php-fpm_standard.conf

udah ane ganti, trus waktu ngeliat status conf yg dipake : #nginx -T ane cariin confnya ga ada
ternyata harus pake nginx (bukan nginxproxy)... hahahaha...
*DudulnyaDirikuhahahaha*

 


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

Page created in 0.037 seconds with 17 queries.

web stats analysis
 
Mirror created by MasterkinG32.CoM