Commit c9c700d9 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #477 in ZP/z-push from...

Merge pull request #477 in ZP/z-push from feature/ZP-1161-update-nginx-config-with-example to develop

* commit 'c175e13a':
  ZP-1161 Changed configuration to Microsoft-Server-ActiveSync and autodiscover locations only. Pre-configured SSL and PHP-FPM settings.
  ZP-1161 Removed trailing spaces, replaced tabs with spaces.
  ZP-1161 update to solve comments from sk. Released under the Affero GNU General Public License (AGPL) version 3.
  ZP-1161 import updated nginx config example. Released under the Affero GNU General Public License (AGPL) version 3.
parents 735a1743 c175e13a
server { server {
listen 443; server_name localhost; # Put your server name
server_name localhost; # Please edit me
ssl on; # Uncomment the following lines to enable SSL support if not configured yet
#ssl_certificate /path/to/ssl.crt; # Please edit me #listen 443 ssl;
#ssl_certificate_key /path/to/ssl.key; # Please edit me #listen [::]:443 ssl;
#ssl on;
#ssl_certificate /path/to/ssl.crt; # Put in the correct path
#ssl_certificate_key /path/to/ssl.key; # Put in the correct path
root /usr/share/webapps/z-push; # If you're using PHP-FPM uncomment the following lines.
index index.php; #include fastcgi_params;
#fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param REQUEST_URI $1;
#fastcgi_param PHP_FLAG "magic_quotes_gpc=off \n register_globals=off \n magic_quotes_runtime=off \n short_open_tag=on";
#fastcgi_param PHP_VALUE "post_max_size=20M \n upload_max_filesize=20M \n max_execution_time=3660";
#fastcgi_param HTTP_PROXY ""; # Mitigate https://httpoxy.org/ vulnerabilities
#fastcgi_read_timeout 3660; # Z-Push Ping might run 3600s, but to be safe
# Performance Settings location ~* /Microsoft-Server-ActiveSync {
#client_max_body_size 4M; alias /usr/share/z-push/index.php;
#client_body_buffer_size 128k;
location / { access_log /var/log/nginx/z-push-access.log;
try_files $uri $uri/ index.php; error_log /var/log/nginx/z-push-error.log;
}
# Attachments ca 15MB max (since binary data needs to be base64 encoded in mine, which results in in about 33% overhead)
client_max_body_size 20m;
client_body_buffer_size 128k;
location /Microsoft-Server-ActiveSync { # Select one of the fastcgi_pass values or adapt to your configuration
rewrite ^(.*)$ /index.php last; #fastcgi_pass unix:/var/run/php5-fpm.sock; # for PHP 5.X Debian/Ubuntu
#fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; # for PHP 7.X Debian/Ubuntu
#fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; # usually RedHat and its derivatives
#fastcgi_pass 127.0.0.1:9000; # default php-fpm config
} }
location ~ .php$ { location ~* /AutoDiscover/AutoDiscover.xml {
include fastcgi_params; alias /usr/share/z-push/autodiscover/autodiscover.php;
fastcgi_index index.php;
fastcgi_param HTTPS on; access_log /var/log/nginx/z-push-autodiscover-access.log;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; error_log /var/log/nginx/z-push-autodiscover-error.log;
# Select one of the fastcgi_pass values or adapt to your configuration
#fastcgi_pass unix:/var/run/php5-fpm.sock; # for PHP 5.X Debian/Ubuntu
#fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; # for PHP 7.X Debian/Ubuntu
#fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; # usually RedHat and its derivatives
#fastcgi_pass 127.0.0.1:9000; # default php-fpm config
fastcgi_pass unix:/run/php-fpm/php-fpm.sock; #fastcgi_index autodiscover.php;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment