xaver
2011-09-15 3504abec909c06cd42eaa32fced7a350c8b3e925
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
server {
        listen <tmpl_var name='ip_address'>:80;
        <tmpl_if name='ssl_enabled'>
        
        listen <tmpl_var name='ip_address'>:443 ssl;
        ssl_certificate <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.crt;
        ssl_certificate_key <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.key;
        </tmpl_if>
        
        server_name <tmpl_var name='domain'> <tmpl_var name='alias'>;
 
        root   <tmpl_var name='web_document_root_www'>;
 
        location / {
            index index.html index.php;
        }
        
        <tmpl_if name='ssi' op='==' value='y'>
        
        location ~ \.shtml$ {
            ssi on;
        }
        </tmpl_if>
 
        <tmpl_if name='errordocs'>
        
        error_page 400 /error/400.html;
        error_page 401 /error/401.html;
        error_page 403 /error/403.html;
        error_page 404 /error/404.html;
        error_page 405 /error/405.html;
        error_page 500 /error/500.html;
        error_page 503 /error/503.html;
        </tmpl_if>
        
        error_log /var/log/ispconfig/httpd/<tmpl_var name='domain'>/error.log;
 
        # serve static files directly
        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
            access_log        off;
        }
 
        ## Disable .htaccess and other hidden files
        location ~ /\. {
            deny all;
            access_log off;
            log_not_found off;
        }
        
        location = /favicon.ico {
            log_not_found off;
            access_log off;
        }
 
        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
        }
        
        location /stats {
            index index.html index.php;
            auth_basic "Members Only";
            auth_basic_user_file <tmpl_var name='stats_auth_passwd_file'>;
        }
 
        <tmpl_if name='php' op='==' value='fast-cgi'>
        
        location ~ \.php$ {
            fastcgi_pass 127.0.0.1:9000;
            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;
        }
        </tmpl_else>
        
        location ~ \.php$ {
            deny all;
        }
        </tmpl_if>
        
        <tmpl_if name='cgi' op='==' value='y'>
        
        location /cgi-bin/ {
            root <tmpl_var name='document_root'>;
            gzip off;
            fastcgi_pass  unix:/var/run/fcgiwrap.socket;
            fastcgi_index index.cgi;
            fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include /etc/nginx/fastcgi_params;
        }
        </tmpl_if>
 
        <tmpl_if name='nginx_directives'>
            <tmpl_var name='nginx_directives'>
        </tmpl_if>
        
}