Showing posts with label nginx. Show all posts
Showing posts with label nginx. Show all posts

Friday, November 9, 2018

How to install latest version of nginx in Centos 7

As of now current nginx version in centos 7 repo is 1.12.2, but latest version of stable nginx is 1.14.1.

In this article we will install latest nginx/1.14.1 in Centos 7.

1. Remove current version of nginx (1.12.2)
sudo yum remove nginx*

Wednesday, November 7, 2018

Running php site with php5-fpm behind nginx (centos 7)

If you're using latest version of nginx nginx-1.14.1-1.el7_4.ngx.x86_64, then by default in /etc/nginx/ you will have this files:

[centos@ip-172-31-37-214 ~]$ ls -la /etc/nginx
total 56
drwxr-xr-x.  3 root root 4096 Nov  7 07:41 .
drwxr-xr-x. 91 root root 8192 Nov  7 07:28 ..
drwxr-xr-x.  2 root root   89 Nov  7 07:37 conf.d
-rw-r--r--.  1 root root 1007 Nov  6 14:04 fastcgi_params
-rw-r--r--.  1 root root 2837 Nov  6 14:04 koi-utf
-rw-r--r--.  1 root root 2223 Nov  6 14:04 koi-win
-rw-r--r--.  1 root root 5170 Nov  6 14:04 mime.types
lrwxrwxrwx.  1 root root   29 Nov  7 07:28 modules -> ../../usr/lib64/nginx/modules
-rw-r--r--.  1 root root  643 Nov  6 13:54 nginx.conf
-rw-r--r--.  1 root root  636 Nov  6 14:04 scgi_params
-rw-r--r--.  1 root root  664 Nov  6 14:04 uwsgi_params
-rw-r--r--.  1 root root 3610 Nov  6 14:04 win-utf

Centos 7: uwsgi.sock failed (13: Permission denied) while connecting to upstream. How to fix.

In centos i had this issue in my nginx error.log:

uwsgi.sock failed (13: Permission denied) while connecting to upstream, client: ...

After searching a bit, I found that this is because of centos SELinux permissions.

Friday, November 25, 2016

How to deploy Trac on Debian Jessie with uwsgi and nginx

Dear all,

Today I'm going to deploy one popular bug tracking tool, which is known as Trac. At first look you may ask: why is it looking so weird? Was it designed in early 90's? Well, yes, interface is very minimalistic. But on the other side it has own benefits - it's absolutely free, written in Python and open source.

Below we will deploy Trac on Debian Jessie with Postgresql, uwsgi and nginx.

As everywhere else, I'm going to stick to my scheme, which I find convenient. If you have any suggestions what can be done better, feel free to tell me in comments or by email.

Also I'm assuming that you know how to install uwsgi and nginx packages. I will only show their trac configuration files. But if you need more info, read how to build uwsgi from source.

Friday, October 2, 2015

How to setup nginx+uwsgi with CKAN

Recently I had to deploy CKAN website on web server. There is nothing difficult if just you follow official documentation and deploy CKAN with Apache. But my choice was uwsgi+nginx, because I always use this bundle.

After setting everything up like I usually do with django, I got below error in nginx log files for all static files:

[error] 1057#0: *70 upstream prematurely closed connection while reading response header from upstream