diff --git a/README_Install_Ubuntu.md b/README_Install_Ubuntu.md index 964dc177d..1160b7146 100644 --- a/README_Install_Ubuntu.md +++ b/README_Install_Ubuntu.md @@ -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 diff --git a/contrib/nginx-zammad.conf b/contrib/nginx-zammad.conf deleted file mode 100644 index 152917247..000000000 --- a/contrib/nginx-zammad.conf +++ /dev/null @@ -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; - } -} diff --git a/contrib/nginx/sites-available/zammad.conf b/contrib/nginx/sites-available/zammad.conf new file mode 100644 index 000000000..0312cd54e --- /dev/null +++ b/contrib/nginx/sites-available/zammad.conf @@ -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; + } +} diff --git a/contrib/nginx/sites-enabled/zammad.conf b/contrib/nginx/sites-enabled/zammad.conf deleted file mode 100644 index d49b3bedc..000000000 --- a/contrib/nginx/sites-enabled/zammad.conf +++ /dev/null @@ -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; - } -}