Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ We're also installing

4. Configure thin.

thin config --config /tmp/redmine.yml --chdir /usr/share/redmine --environment production --socket /var/run/redmine/sockets/thin.sock --daemonize --log /var/log/thin/redmine.log --pid /var/run/thin/redmine.pid --user www-data --group www-data --servers 1
thin config --config /tmp/redmine.yml --chdir /usr/share/redmine --environment production --socket /var/lib/redmine/sockets/thin.sock --daemonize --log /var/log/thin/redmine.log --pid /var/lib/thin/redmine.pid --user www-data --group www-data --servers 1

Here we're configuring thin to run with **one server**, to run as
a **daemon** (in the background), to log at
`/var/log/thin/redmine.log` to write the PID file at
`/var/run/thin/redmine.pid` to create the listeninx UNIX sockets
at `/var/run/redmine/sockets` to run with user and group
`/var/lib/thin/redmine.pid` to create the listeninx UNIX sockets
at `/var/lib/redmine/sockets` to run with user and group
`www-data` and to run the rails app (redmine) in a **production** setup.

Move the config file to the final location:
Expand All @@ -139,15 +139,15 @@ We're also installing

Create and fix the permissions of the sockets directory.

mkdir -p /var/run/redmine/sockets
mkdir -p /var/lib/redmine/sockets

chown www-data.www-data /var/run/redmine/sockets
chown www-data.www-data /var/lib/redmine/sockets

5. Launch thin:

service thin start

You should see the socket that was created, `ls /var/run/redmine/sockets`:
You should see the socket that was created, `ls /var/lib/redmine/sockets`:

`srwxrwxrwx 1 www-data www-data 0 Abr 11 15:42 thin.0.sock`

Expand Down
3 changes: 3 additions & 0 deletions sites-available/projects.example.com
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ server {
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_pass http://redmine_thin;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}

## Protect .git files.
Expand Down
3 changes: 3 additions & 0 deletions sites-available/secure.projects.example.com
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ server {
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_pass http://redmine_thin;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}

## Protect .git files.
Expand Down
2 changes: 1 addition & 1 deletion upstream_thin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
### Upstreams for thin.

upstream redmine_thin {
server unix:/var/run/redmine/sockets/thin.0.sock;
server unix:/var/lib/redmine/sockets/thin.0.sock;
}