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:23:49

Author Topic: Nginx Proxy tidak support web https  (Read 2967 times)

0 Members and 1 Guest are viewing this topic.

Offline bugis

  • Valuable Member
  • *
  • Posts: 113
  • Karma: +0/-0
    • View Profile
Nginx Proxy tidak support web https
« on: 2014-03-11, 12:40:38 »
Malam...

saya sudah install Ssl Certificates dan berjalan lancar menggunakan https di apache + modphpruid2.
ketika saya switch ke Nginxproxy + php fpm event kenapa tampilan web tidak beraturan (tidak terbuka secara sempurna).
saya coba Nginxproxy + modphpruid2 sama saja. Akhirnya saya kembalikan ke apache saja.

Mohon bantuannya....

Terima kasih

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginx Proxy tidak support web https
« Reply #1 on: 2014-03-11, 13:00:49 »
Apa ada masalah dengan php-fpm_event?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline zenkul

  • Global Moderator
  • Master
  • *****
  • Posts: 383
  • Karma: +3/-0
    • View Profile
    • home & decor
easy, secure and speed up web panel ===> Kloxo-MR

Offline bugis

  • Valuable Member
  • *
  • Posts: 113
  • Karma: +0/-0
    • View Profile
Re: Nginx Proxy tidak support web https
« Reply #3 on: 2014-03-11, 15:55:39 »
adakah cara yang lebih detail om.
saya coba belum berhasil.

Offline bugis

  • Valuable Member
  • *
  • Posts: 113
  • Karma: +0/-0
    • View Profile
Re: Nginx Proxy tidak support web https
« Reply #4 on: 2014-03-12, 00:51:00 »
Mohon bantuannya pak mustafa....

Offline bugis

  • Valuable Member
  • *
  • Posts: 113
  • Karma: +0/-0
    • View Profile
Re: Nginx Proxy tidak support web https
« Reply #5 on: 2014-03-12, 10:27:48 »
Berikut saya lampirkan tampilan http & https menggunakan nginx-proxy

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginx Proxy tidak support web https
« Reply #6 on: 2014-03-12, 10:57:30 »
Saya pikir anda belum baca rujukan yang diberikan @zenkul.

Sederhananya, copy /home/nginx/conf/globals/proxy.conf ke custom.proxy.conf dan kemudian tambahkan '        proxy_set_header X-Forwarded-Protocol $scheme;' dalam 'location / { }'. Setelah itu restart web anda dengan 'sh /script/restart-web'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline bugis

  • Valuable Member
  • *
  • Posts: 113
  • Karma: +0/-0
    • View Profile
Re: Nginx Proxy tidak support web https
« Reply #7 on: 2014-03-12, 15:48:46 »
isi dari /home/nginx/conf/globals/proxy.conf :

proxy_ignore_headers Expires Cache-Control;
    proxy_cache_use_stale error timeout invalid_header http_502;
    proxy_cache_bypass $cookie_session;
    proxy_no_cache $cookie_session;

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

    proxy_connect_timeout 180s;
    proxy_send_timeout 180s;
    proxy_read_timeout 180s;
    #proxy_buffers 32 4k;
    proxy_buffers 8 128k;
    proxy_buffer_size 128k;

    ### MR -- change enable = @wp when using wordpress
    error_page 404 /404.html;

saya copy ke custom.proxy.conf

proxy_set_header X-Forwarded-Protocol $scheme; ditambahkan ke lokasi mana pak ?
mohon maaf merepotkan.
Terima kasih sebelumnya

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Nginx Proxy tidak support web https
« Reply #8 on: 2014-03-13, 03:11:37 »
Jika anda pakai 6.5.1.b maka tinggal diupdate. Jika 6.5.0.f, ubah:

Code: [Select]
...
        proxy_set_header Host $domain;
        proxy_set_header X-Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-For $remote_addr;
   
        proxy_pass_header Set-Cookie;
...

ke:
Code: [Select]
...
        proxy_set_header Host $domain;
        proxy_set_header X-Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header X-Forwarded-Protocol $scheme;
   
        proxy_pass_header Set-Cookie;
...
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline bugis

  • Valuable Member
  • *
  • Posts: 113
  • Karma: +0/-0
    • View Profile
Re: Nginx Proxy tidak support web https
« Reply #9 on: 2014-03-13, 12:56:20 »
Terima kasih pak mustafa sudah dapat berjalan https di nginx proxy.
salah satu kendala saya saat ini adalah direct domain dari http ke https.

saya mencoba set langsung di setting wordpress menggunakan https://www.domain.com
dan hasilnya saya ketik dibrowser domain.com tidak didirect ke https://www.domain.com

saya gunakan .htaacces :
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteRule ^/?$ "https\:\/\/www\.domain\.com" [R=301,L]
</IfModule>
# END WordPress

sepertinya ada conflig web tidak dapat dibuka.
adakah cara untuk mendirect http ke https yang dapat digunakan ?
***CMS Wordpress

Offline bugis

  • Valuable Member
  • *
  • Posts: 113
  • Karma: +0/-0
    • View Profile
Re: Nginx Proxy tidak support web https
« Reply #10 on: 2014-03-14, 20:54:01 »
mungkin ada cara direct http ke https dengan edit php ?
karena dengan htaacces tidak bisa.
mohon bantuannya.....

 


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

Page created in 0.042 seconds with 17 queries.

web stats analysis
 
Mirror created by MasterkinG32.CoM