nginx error connect to php5-fpm.sock failed (13: Permission denied)

I had a similar error after php update. PHP fixed a security bug where o had rw permission to the socket file. Open /etc/php5/fpm/pool.d/www.conf or /etc/php/7.0/fpm/pool.d/www.conf, depending on your version. Uncomment all permission lines, like: listen.owner = www-data listen.group = www-data listen.mode = 0660 Restart fpm – sudo service php5-fpm restart or sudo service php7.0-fpm … Read more

(13: Permission denied) while connecting to upstream:[nginx]

Disclaimer Make sure there are no security implications for your use-case before running this. Answer I had a similar issue getting Fedora 20, Nginx, Node.js, and Ghost (blog) to work. It turns out my issue was due to SELinux. This should solve the problem: setsebool -P httpd_can_network_connect 1 Details I checked for errors in the … Read more

Nginx no-www to www and www to no-www

HTTP Solution From the documentation, “the right way is to define a separate server for example.org“: server { listen 80; server_name example.com; return 301 http://www.example.com$request_uri; } server { listen 80; server_name www.example.com; … } HTTPS Solution For those who want a solution including https://… server { listen 80; server_name www.domain.example; # $scheme will get the … Read more

Node.js + Nginx – What now?

Nginx works as a front end server, which in this case proxies the requests to a node.js server. Therefore you need to setup an Nginx config file for node. This is what I have done in my Ubuntu box: Create the file yourdomain.example at /etc/nginx/sites-available/: vim /etc/nginx/sites-available/yourdomain.example In it you should have something like: # … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)