nginx

nginx 502 Bad Gateway

1.0 502 Bad Gateway After the update of Linux on the web server, the website would not open in the browser. Instead the following error was displayed. 502 Bad Gateway nginx/1.14.0 2.0 Solution First we check the nginx server. $ systemctl status nginx ● nginx.service – A high performance web server and a reverse proxy …

nginx 502 Bad Gateway Read More »

How to execute PHP code in HTML under nginx server

1.0 Error PHP code was not getting executed in the index.html file when the concerned website was opened in a browser. nginx server was being used to serve the web pages. 2.0 Solution 2.1 Install php7.0-fpm $ sudo apt-get install php7.0-fpm 2.2 nginx configuration Add the following lines to the nginx configuration file, /etc/nginx.conf. location …

How to execute PHP code in HTML under nginx server Read More »

Analyzing the NGINX web server log file

1.0 Introduction Given an nginx web server log file, we might like to know who are the visitors to our website. One can go line by line through the log file, but that is tedious. It would be nice if we can get one line per client visiting the website, giving the IP address of …

Analyzing the NGINX web server log file Read More »

nginx 502 Bad Gateway Error

PROBLEM A routine software update on the server running nginx was done. After that the website stopped opening in the browser window and 502 Bad Gateway error along with the nginx version number was displayed. Looking in the log file showed an entry like, 2014/06/26 11:09:53 [crit] 2539#0: *15 connect() to unix:/tmp/php-fpm.sock failed (13: Permission …

nginx 502 Bad Gateway Error Read More »

Nginx 502 bad gateway error after switching off the mobile theme

The WPtouch plugin gives a WordPress website the capability to be displayed on mobile devices using a suitable theme. At the end of the web page, there is a toggle button to switch off the mobile theme and use the default desktop theme. That is, a user can toggle between the mobile and the default …

Nginx 502 bad gateway error after switching off the mobile theme Read More »

Nginx installation and configuration

The configuration is nginx HTTP server, PHP FastCGI Process Manager (PHP-FPM), and the Alternative PHP Cache (APC). Installation The first step is to download the nginx software from the Nginx website. If using the Ubuntu distribution, following are the steps, (i) Download the nginx signing keys from the Nginx website, $ wget http://nginx.org/keys/nginx_signing.key (ii) Add …

Nginx installation and configuration Read More »