How to fix 502 error when using reverse proxy on Fedora

In computer networks, a reverse proxy is a type of proxy server that retrieves resources on behalf of a client from one or more servers. These resources are then returned to the client as though they originated from the proxy server itself.

Reverse proxy can be useful in many ways. You can hide your application original URL by masking it with proxy. You can easily control who visit your URL with “allow” & “deny” function. You can add HTTPS protocol on top of the application that not supporting it (I’m looking at you Transmission Webui).

Reverse proxy can be archive in Nginx simply by using this line of code inside the server block.

Continue reading “How to fix 502 error when using reverse proxy on Fedora”

How to fix WordPress auto update on Nginx & PHP-FPM

What i like about WordPress is the ability to install and update directly from the dashboard without using other software like FTP. But sometimes the function would not work.

The problem? File ownership or permission. Here some tips on how to fix it.

1. Confirm the file belong to Nginx.

On Apache, all the file should be own by www-data user. On some distribution that come with Nginx, “nginx” is the user. So to make sure all our web data belong to Nginx, we need to do this command.

sudo chown -R nginx:nginx /var/www/*

The location varies on platform. For mine it’s on /var/www

Continue reading “How to fix WordPress auto update on Nginx & PHP-FPM”