Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name mail.example.com;
- return 301 https://$http_host$request_uri;
- }
- server {
- # base domain
- index index.php;
- server_name mail.example.com;
- listen 443 ssl default_server;
- root /usr/share/rainloop/public_html;
- ssl_certificate /etc/nginx/ssl/mail.example.com.crt;
- ssl_certificate_key /etc/nginx/ssl/mail.example.com.key.txt;
- ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_prefer_server_ciphers on;
- ssl_session_cache shared:SSL:10m;
- ssl_session_timeout 5m;
- client_max_body_size 8M;
- location / {
- try_files $uri $uri/ /index.php?$query_string;
- }
- location ~ \.php$ {
- fastcgi_index index.php;
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- fastcgi_keep_conn on;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
- # phpmyadmin
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- error_log /var/log/nginx/phpmyadmin.error.log;
- access_log /var/log/nginx/phpmyadmin.access.log;
- }
- # vimbadmin
- location /vimbadmin {
- autoindex on;
- alias /usr/share/vimbadmin/public;
- location ~ ^(.+\.php)$ {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- include fastcgi_params;
- }
- }
- location ~ /\.ht {
- deny all;
- }
- location ^~ /data {
- deny all;
- }
- error_log /var/log/nginx/mail.example.com.error.log;
- access_log /var/log/nginx/mail.example.com.access.log;
- }
- server {
- listen 1337;
- server_name mail.example.com;
- root /usr/share/vimbadmin/public;
- index index.php;
- # Logs
- error_log /var/log/nginx/vimbadmin.error.log;
- access_log /var/log/nginx/vimbadmin.access.log;
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- # Pass the PHP scripts to FastCGI server
- location ~ \.php$ {
- # Prevent Zero-day exploit
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement