Showing posts with label Nginx. Show all posts
Showing posts with label Nginx. Show all posts

Thursday, 15 May 2014

Solution : Nginx 502 Bad Gateway Error

If you got 502 Bad Gateway Error in Nginx after updating software in your system.
Because of update in php-fpm this error may occur.

1. Edit /etc/php-fpm.d/www.conf

vi /etc/php-fpm.d/www.conf
And set listen line to look as follows:

listen = 127.0.0.1:9000

2. Now change nginx configuration files of each domain which may be in /etc/nginx/conf.d folder. in each file change

fastcgi_pass   unix:/tmp/php5-fpm.sock;
to 
fastcgi_pass 127.0.0.1:9000;

Restart nginx and php-fpm

And check in browser whether your site working or Not.

I hope It will work :)

Read More

Monday, 10 February 2014

Nginx Error - 413 Request Entity Too Large

Hi if you get 413 Request Entity Too Large error in Nginx Serve to avoid this error some people suggest increase post size in php.ini ie
post_max_size = 25M
But even changing this value error still occurring means you need to change nginx configuration file.
add client_max_body_size 20M to nginx configuration file of server. check below where to add that line.

server {
    client_max_body_size 20M;
    listen 80;
    server_name example.com;
    access_log /var/log/nginx/nginx.access.log;
    error_log /var/log/nginx/nginx.error.log;
....
....
}
Read More

Thursday, 23 January 2014

Solution : Nginx Wordpress Pretty Permalinks Problem

To enable Pretty Permalinks feature in nginx simply modify the nginx conf file of wordpress site add following line
try_files $uri $uri/ /index.php?$args;
check example where to add above line

Example:
file: wordpress.conf
.....................
.......................
 location / {
        root   /var/www/html/wordpress;
        index  index.php index.html index.htm;
try_files $uri $uri/ /index.php?$args;
    ...
    .....

 }
................
................
Read More
Here We Write The Problems we face at different situations and Solutions to those problems.