O
O
Oleg Aksenov2016-04-20 15:35:43
Nginx
Oleg Aksenov, 2016-04-20 15:35:43

How to install redmine on debian(varnish+nginx)?

Good day, I actually encountered such a problem and a question, I have varnish running on the front-end on port 80, when nginx processes information on port 81 in the back-end, it’s impossible to put Redmine as a regular cms or an ordinary php-framework, subtracted about thin and passenger, I tried to start them, something went wrong, I can’t understand why it is necessary to install thin or passenger in order for redmine to work together with nginx, can’t do without it?
I used the documentation from the redmine wiki itself and from the Internet, but maybe the problem is that I took port 80 to another, and the structure apparently assumes that nginx will be 80, and the back-end will be thin for example.
Now I have this error in the nginx logs

to unix:/tmp/thin.0.sock failed (2: No such file or directory) while connecting to upstream

I understand that it cannot find it, but it must create this file on startup, no?
With this config redmine.yml
---
pid: tmp/pids/thin.pid
group: redmine
wait: 30
timeout: 30
log: log/thin.log
max_conns: 1024
require: []

environment: production
max_persistent_conns: 512
servers: 1
daemonize: true
user: redmine
socket: /tmp/thin.sock
chdir: /usr/local/share/redmine

in nginx setup for host
upstream thin_server {
    server unix:/tmp/thin.0.sock;
}
# Веб-сервер видимый из вне
server
{
    #имя сервера
    server_name site.ru www.site.ru;

    #НЕ Используем HTTPS(SSL)
    listen 127.0.0.1:81;

    #логи
    access_log /var/log/nginx/access.log;
    error_log  /var/log/nginx/error.log;

    #Папка public редмайна
    root /usr/local/share/redmine/public;

    # Основной location. Он отдаёт все статические файлы "как следует", а все
    # нестатические адреса редиректит на прокси-сервер, которым и является thin
    location  / {
        proxy_redirect off;
        proxy_set_header Host site.ru;
        try_files $uri/index.html $uri.html $uri @thin;
    }

    # Именованый Location для того, чтобы было куда сослаться
    location @thin
    {
        proxy_pass http://thin_server;
    }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tutunak, 2016-04-20
@tutunak

check if you have thin running and ktati from tmp only the process that created this file or directory can read the file, put it in another place and give nginx permissions
here is a link to how I configured the configuration

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question