nginx_ispconfig.vhost.master 2.91 KB
Newer Older
1
server {
Bimon's avatar
Bimon committed
2
        listen {vhost_port};
3
		ssl {ssl_on};
4
5
        {ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
        {ssl_comment}ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;
6
7
8
		
		# redirect to https if accessed with http
		{ssl_comment}error_page 497 https://$host:{vhost_port}$request_uri;
9
10
11
12
13

        server_name _;

        root   /usr/local/ispconfig/interface/web/;

14
15
        client_max_body_size 20M;

16
17
18
19
20
21
22
23
24
25
        location / {
               index index.php index.html;
        }

        # serve static files directly
        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
               access_log        off;
        }

        location ~ \.php$ {
26
               try_files $uri =404;
27
               include /etc/nginx/fastcgi_params;
28
               fastcgi_pass unix:{fpm_socket};
29
30
31
               fastcgi_index index.php;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_param PATH_INFO $fastcgi_script_name;
32
33
34
35
               fastcgi_buffer_size 128k;
               fastcgi_buffers 256 4k;
               fastcgi_busy_buffers_size 256k;
               fastcgi_temp_file_write_size 256k;
36
37
38
39
40
41
        }

        location ~ /\. {
               deny  all;
        }
		
42
43
44
45
46
47
48
#        location /phpmyadmin {
#               root /usr/share/;
#               index index.php index.html index.htm;
#               location ~ ^/phpmyadmin/(.+\.php)$ {
#                       try_files $uri =404;
#                       root /usr/share/;
#                       include /etc/nginx/fastcgi_params;
49
#                       fastcgi_pass unix:{fpm_socket};
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#                       {ssl_comment}fastcgi_param  HTTPS {fastcgi_ssl};
#                       fastcgi_index index.php;
#                       fastcgi_param SCRIPT_FILENAME $request_filename;
#               }
#               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
#                       root /usr/share/;
#               }
#        }
#        location /phpMyAdmin {
#               rewrite ^/* /phpmyadmin last;
#        }
#		
#        location /squirrelmail {
#               root /usr/share/;
#               index index.php index.html index.htm;
#               location ~ ^/squirrelmail/(.+\.php)$ {
#                       try_files $uri =404;
#                       root /usr/share/;
#                       include /etc/nginx/fastcgi_params;
69
#                       fastcgi_pass unix:{fpm_socket};
70
71
72
73
74
75
76
77
78
79
80
#                       {ssl_comment}fastcgi_param  HTTPS {fastcgi_ssl};
#                       fastcgi_index index.php;
#                       fastcgi_param SCRIPT_FILENAME $request_filename;
#               }
#               location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
#                       root /usr/share/;
#               }
#        }
#        location /webmail {
#               rewrite ^/* /squirrelmail last;
#        }
81
}