Merge pull request #225 from monotek/develop
new nginx config & updated ubuntu install manual
This commit is contained in:
commit
52a3498c0a
4 changed files with 50 additions and 80 deletions
|
@ -4,7 +4,7 @@
|
|||
### Prerequisites
|
||||
* apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev pkg-config libffi-dev libmysqlclient-dev mysql-server nginx
|
||||
* mysql --defaults-extra-file=/etc/mysql/debian.cnf -e "CREATE USER 'zammad'@'localhost' IDENTIFIED BY 'Your_Pass_Word!'; GRANT ALL PRIVILEGES ON zammad_prod.* TO 'zammad'@'localhost'; FLUSH PRIVILEGES;"
|
||||
* ln -s /opt/zammad/contrib/nginx/sites-enabled/zammad.conf /etc/nginx/sites-enabled/zammad.conf
|
||||
* ln -s /opt/zammad/contrib/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/zammad.conf
|
||||
|
||||
### Add User
|
||||
* useradd zammad -m -d /opt/zammad -s /bin/bash
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
#
|
||||
# this is the nginx config for zammad
|
||||
# link this file in your /etc/nginx/sites-enabled via symlink
|
||||
# (ln -s /opt/zammad/contrib/nginx-zammad.conf /etc/nginx/sites-enabled/zammad.conf)
|
||||
#
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name your.domain.org;
|
||||
root /opt/zammad/public;
|
||||
|
||||
access_log /var/log/nginx/zammad.access.log;
|
||||
error_log /var/log/nginx/zammad.error.log;
|
||||
|
||||
client_max_body_size 50M;
|
||||
|
||||
upstream zammad {
|
||||
server unix://opt/zammad/var/zammad.sock
|
||||
}
|
||||
|
||||
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
|
||||
expires max;
|
||||
}
|
||||
|
||||
location /ws {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_pass http://localhost:6042;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://zammad;
|
||||
}
|
||||
}
|
49
contrib/nginx/sites-available/zammad.conf
Normal file
49
contrib/nginx/sites-available/zammad.conf
Normal file
|
@ -0,0 +1,49 @@
|
|||
#
|
||||
# this is the nginx config for zammad
|
||||
# link this file in your /etc/nginx/sites-enabled via symlink
|
||||
# (ln -s /opt/zammad/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/zammad.conf)
|
||||
#
|
||||
|
||||
upstream zammad {
|
||||
server localhost:3000;
|
||||
}
|
||||
|
||||
upstream zammad-websocket {
|
||||
server localhost:6042;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name zammad.intdmz.h1.mdd zammad.magix-support.net;
|
||||
root /opt/zammad/public;
|
||||
|
||||
access_log /var/log/nginx/zammad.access.log;
|
||||
error_log /var/log/nginx/zammad.error.log;
|
||||
|
||||
client_max_body_size 50M;
|
||||
|
||||
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
|
||||
expires max;
|
||||
}
|
||||
|
||||
location /ws {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header CLIENT_IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 86400;
|
||||
proxy_pass http://zammad-websocket;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header CLIENT_IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://zammad;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/html text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
|
||||
gzip_proxied any;
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
#
|
||||
# this is the nginx config for zammad
|
||||
# link this file in your sites-enabled via symlink (ln -s nginx-zammad.conf /etc/nginx/sites-enabled/zammad.conf)
|
||||
#
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name your.domain.org;
|
||||
root /opt/zammad/public;
|
||||
|
||||
access_log /var/log/nginx/zammad.access.log;
|
||||
error_log /var/log/nginx/zammad.error.log;
|
||||
|
||||
client_max_body_size 50M;
|
||||
|
||||
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
|
||||
expires max;
|
||||
}
|
||||
|
||||
# proxy all to app server
|
||||
location / {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header CLIENT_IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://localhost:3000;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/html text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
|
||||
gzip_proxied any;
|
||||
}
|
||||
|
||||
# proxy web sockets to app server
|
||||
location /ws {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header CLIENT_IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 86400;
|
||||
proxy_pass http://localhost:6042;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue