nginx_ispconfig.vhost.master 1.74 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
server {
        listen {vhost_port}{ssl_on};
        {ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
        {ssl_comment}ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;

        server_name _;

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

        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$ {
20
               try_files $uri =404;
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
               fastcgi_pass 127.0.0.1:{fpm_port};
               fastcgi_index index.php;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_param PATH_INFO $fastcgi_script_name;
               include /etc/nginx/fastcgi_params;
        }

        location ~ /\. {
               deny  all;
        }
		
        location /phpmyadmin/ {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
36
                       try_files $uri =404;
37
38
39
40
41
42
43
44
45
46
47
                       root /usr/share/;
                       fastcgi_pass 127.0.0.1:{fpm_port};
                       {ssl_comment}fastcgi_param  HTTPS {fastcgi_ssl};
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
48
49
50
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }
51
}