Home > Pengalaman, Tips dan Trik > Upgrade NGINX 1.6 ke 1.8 = blank putih?

Upgrade NGINX 1.6 ke 1.8 = blank putih?

Bagi anda yang upgrade dari NGINX 1.6 ke 1.8 lalu saat upgrade ditanyakan “Mau pakai konfigurasi bawaan dari nginx atau yang kemarin (versi 1.6) ?” dan setelah itu website jadi putih bersih…

Configuration file `/etc/nginx/sites-available/default'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
 What would you like to do about it ? Your options are:
 Y or I : install the package maintainer's version
 N or O : keep your currently-installed version
 D : show the differences between the versions
 Z : start a shell to examine the situation
 The default action is to keep your current version.
*** default (Y/I/N/O/D/Z) [default=N] ?

Pasti tentu akan memilih “N” Namun setelah upgrade hanya muncul halaman putih? Tidak ada apapun?

Kemungkinan besar error nya terdapat pada fastcgi_params.

Di NGINX 1.8 entah kenapa /etc/nginx/fastcgi_params berisi:

...

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;

...

Dimana hal ini tiba-tiba berubah dari _FILENAME ke _NAME. (Yah, untuk $fastcgi_script_name; gw gak tahu memang bawaannya begitu atau tidak)

Solusi:

1. (Rekomendasi) Ganti fastgi_params diatas dengan:

fastcgi_param  SCRIPT_FILENAME    $request_filename;

Dengan catatan, pada blok ~ \.php$ kamu menggunakan:

include fastcgi_params;

 

2. Seperti biasa, pada blok ~ \.php$ tambahkan:

fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
Categories: Pengalaman, Tips dan Trik
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: