toggle menu

502 Bad Gateway nginx error

Dhananjay Kumar |04 Oct at 08:10

After creating new server LEMP on digital ocean getting below error, please any one heplon this.

502 Bad Gateway



  • 1 like

Dhananjay Kumar04 Oct at 10:10

I got the solution:
if you have on nginx server then go with error log here:

in the log file, you seem proper issues.
Like i have issues with "fastcgi://unix:/run/php/php7.0-fpm.sock:"
just chage with new version php7.2 and working fine.

immwit work12 Dec at 01:12

don't know

I am installing phpmyadmin on nginx server (LEMP) and running below Command getting issues :

sudo ln -s /usr/share/phpmyadmin /usr/share/nginx/html

Please any one help me...

  • 1 like
  • 1 comment

Dhanavi29 Mar at 06:03

I am getting the same issues, just change in path and run code
sudo ln -s /usr/share/phpmyadmin /var/www/html

My project's requirement is to integrate codeigniter and wordpress. Codeigniter files are in root directory of wordpress. Everything is working fine in wordpress but when i access the codeigniter pages it redirect me on wordpress's page not found page. My site is running on LEMP server. i searched regarding it on google , there were some solutions so i tried them but nothing worked in my case. Please help. I thank you in advance.

  • 1 like
  • 1 comment

Dhananjay Kumar26 May at 11:05

I was getting the same issues with LEMP server cause there, not .htaccess file working.
Due to this reason Codeigniter files path "" is followed WordPress URL.
I have done the following below script in /etc/nginx/sites-enabled/default file:

location /xyz {
try_files $uri $uri/ /xyz/index.php?$args;
location /test {
try_files $uri $uri/ /test/index.php?$args;

Added above multiple "location" path which using in CodeIgniter. And its working fine for me.
Please once try above, hope you getting the solution.

Postfix install for the send only mail on LEMP

Dhananjay Kumar |10 Apr at 05:04

Hi All,

I have installed postfix on the LEMP server for the SMTP send only mail.

And its working fine, but mail going always in spam.

I want a solution to mail going to inbox directly. please suggest

  • 1 like
  • 0 comment

Gip Compression on Nginx Server

Sanjay Kumar |29 Mar at 06:03

I have put below value indie the /etc/nginx/nginx.conf inside http like below and its work fine for me

http {


    # Gzip Settings

        gzip on;
        gzip_vary on;
        gzip_disable "MSIE [1-6]\.";
        gzip_static on;
        gzip_min_length 1400;
        gzip_buffers 32 8k;
        gzip_http_version 1.0;
        gzip_comp_level 5;
        gzip_proxied any;
        gzip_types text/plain text/css text/xml application/javascript application/x-javascript application/xml application/xml+rss application/emacscript application/json image/svg+xml;




Vibhu Vikram Singh10 Apr at 07:04

how to solven

Vibhu Vikram Singh10 Apr at 07:04


Vibhu Vikram Singh10 Apr at 08:04


I have uploaded my project Digital Ocean LEMP and getting issue with 

1. Datatype datetime - 0000-00-00 00:00:00 is not valid date type

2. Datatype Integer - Incorrect integer value for column name at row 1

3. Datatype Float - Data truncated for column for column name at row 1

Basically these error were coming at insert and update time, as proper datatype was not coming from php end.

I cannot change php end as project is live.

How to dissolve these issues. thanks in advance

  • 1 like

Dhananjay Kumar03 Apr at 12:04

I am getting the same issues & i have updated MySQL settings and its work fine for me.

You go in a file : /etc/mysql/mysql.conf.d/mysqld.cnf
and add below script at end of line

After adding restart your MySQL: sudo service mysql restart

Please try, its really work.

Manas Mayank03 Apr at 12:04

Thats works for me. Thanks