New nginx makes PHP website return blank page

Recently, I upgraded Nginx in this server and after some days, I discovered that one of my PHP websites (for internal use) was not working! It just returned completely blank page (no text or HTML source), even with the script containing only phpinfo().

At first, I didn't know that it was caused by Nginx, or it is because of upgrading Nginx. I tried to look in to various log files, from Nginx's to php5-fpm but did not see anything. I configured PHP to always display error, still no help. Searching around, I found that someones in Internet also get this phenomenon, after upgrading Nginx. Some suggests to change Nginx's virtual host configuration (the files in /etc/nginx/sites-available/). So I understand that new Nginx may bring changes that old configuration file will not be compatible!

But, then there is a question: How do I know how the configuration should be, to be working with upgraded Nginx?

Well, I've just noticed that Nginx installation on Ubuntu comes with some sample in snippets/ folder:


Truy cập nhanh giao diện dòng lệnh của PostgreSQL

Để truy cập vào một hệ sơ sở dữ liệu (CSDL), ta luôn cần 3 thông số: địa chỉ server, username và password. Sẽ không là vấn đề khi một chương trình được cấu hình tự động để truy cập vào hệ CSDL, nhưng nhiều khi ta phải kết nối vào giao diện dòng lệnh, để tự tay làm một số việc với dữ liệu, và phải đối mặt với sự phiền hà của việc tìm lại và khai báo username, password. Username có thể dễ hơn vì ta thường đặt một username dễ nhớ, nhưng password thì luôn phải rắc rối và thường ta không thể nhớ được, phải cất đâu đó. Đã phải mất công tìm kiếm, mà tự tay gõ cũng phiền nữa. Thế nhưng với PostgreSQL, ta có một mẹo để làm việc này nhẹ nhàng hơn.

PostgreSQL cho phép "gắn kết" một tài khoản user trong nó với tài khoản user của hệ điều hành. Ví dụ trên hệ điều hành (Linux, Unix) ta có user quan và trong PostgreSQL ta tạo một user (role) cũng tên quan, thì khi ta đang đăng nhập vào hệ điều hành dưới user quan, ta có thể truy cập ngay lập tức vào PostgreSQL dưới role quan mà không cần đăng nhập, tức là không phải khai báo hostname, username và password.

Thay vì ta phải gõ

...