Running GO prof 6.x with Nginx Webserver

Having trouble installing Group-Office? No worries. Help is on the way.

Moderator: Developers

peter_stirnberg
Posts: 268
Joined: Tue Dec 13, 2005 7:57 am

Running GO prof 6.x with Nginx Webserver

Postby peter_stirnberg » Thu May 11, 2017 1:23 pm

Hello folks,

here is my solution for running (and syncing) GO prof 6.x with Nginx webserver. Please note that trailing slashes are essential :wink:
I added some security stuff and tested it with GO 6.1.136 and 6.2.38.

Have fun!
Attachments
Running GO prof. 6 with nginx.pdf
(44.06 KiB) Downloaded 191 times
peter_stirnberg
Posts: 268
Joined: Tue Dec 13, 2005 7:57 am

Re: Running GO prof 6.x with Nginx Webserver

Postby peter_stirnberg » Wed May 17, 2017 11:35 am

PHP Update:

In case you have php7 installed simply exchange php5 with php7.0 (Debian or Ubuntu)
peter_stirnberg
Posts: 268
Joined: Tue Dec 13, 2005 7:57 am

Re: Running GO prof 6.x with Nginx Webserver

Postby peter_stirnberg » Fri Jun 15, 2018 1:42 pm

Udate for syncing ActiveSync and DAV protocols under nginx. Works for GO 6.2 and 6.3. All my tests proof that hereby GO is fully supported by Nginx.

Here's a sample site-config:

server {
listen 80;
server_name my_go_server;
root /var/www/html/DocRoot;
index index.php index.html;
#Redirect all traffic to https
return 301 https://$host$request_uri;
}

# HTTPS
server {
listen 443;
server_name my_go_server;
root /var/www/html/DocRoot;
ssl on;
ssl_certificate /etc/letsencrypt/live/my_go_server/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/my_go_server/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# Fix 'The Logjam Attack'.
ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security max-age=31536000;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
add_header Referrer-Policy "no-referrer";
index index.php index.html;

location / {
try_files $uri $uri/ =404;
}

error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

location ~ ^(.+\.php)(.*) {
try_files $fastcgi_script_name =404;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_index index.php;
include fastcgi_params;
}

location /caldav {
rewrite /caldav/(.*)$ /modules/caldav/calendar.php?/$1 last;
}

location /carddav {
rewrite /carddav/(.*)$ /modules/carddav/addressbook.php?/$1 last;
}

location /webdav {
rewrite /webdav/(.*)$ /modules/dav/files.php?/$1 last;
}

location /Microsoft-Server-ActiveSync {
rewrite /Microsoft-Server-ActiveSync(.*)$ /modules/z-push/index.php?/$1 last;
}

location = /.well-known/carddav {
return 301 $scheme://$host/carddav/;
}
location = /.well-known/caldav {
return 301 $scheme://$host/caldav/;
}
}
Last edited by peter_stirnberg on Wed Jun 27, 2018 9:06 am, edited 2 times in total.
mschering
Site Admin
Site Admin
Posts: 8219
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: Running GO prof 6.x with Nginx Webserver

Postby mschering » Tue Jun 26, 2018 3:08 pm

Thanks for sharing!
Best regards,

Merijn Schering
Intermesh

Who is online

Users browsing this forum: No registered users and 1 guest

cron