Created
July 16, 2018 00:20
-
-
Save regulyarniy/8ec403616f896992a3adeca80aca413d to your computer and use it in GitHub Desktop.
Zabbix nginx example config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name zabbix.domain.ru; | |
| return 301 https://zabbix.domain.ru$request_uri; | |
| } | |
| server { | |
| listen 443 ssl default_server; | |
| ssl_session_cache builtin:1000 shared:SSL:10m; | |
| ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
| ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; | |
| ssl_prefer_server_ciphers on; | |
| ssl_session_cache shared:SSL:10m; | |
| ssl_dhparam /etc/nginx/dhparam.pem; | |
| ssl_certificate /etc/nginx/wildcard.pem; | |
| ssl_certificate_key /etc/nginx/wildcard.key; | |
| add_header X-Cache $upstream_cache_status; | |
| root /usr/share/zabbix; | |
| index index.php index.html index.htm; | |
| server_name zabbix.domain.ru; | |
| location / { | |
| try_files $uri $uri/ =404; | |
| } | |
| location ~ \.php$ { | |
| fastcgi_pass unix:/run/php/php7.0-fpm.sock; | |
| fastcgi_index index.php; | |
| fastcgi_param PHP_VALUE " | |
| max_execution_time = 300 | |
| memory_limit = 128M | |
| post_max_size = 16M | |
| upload_max_filesize = 2M | |
| max_input_time = 300 | |
| date.timezone = Asia/Vladivostok | |
| always_populate_raw_post_data = -1 | |
| "; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| try_files $uri =404; | |
| include fastcgi_params; | |
| } | |
| location ~ /\.ht { | |
| deny all; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment