View difference between Paste ID: K1iNn4bB and EEpa4vtJ
SHOW: | | - or go back to the newest paste.
1
server {
2
    listen 80 default_server;
3
	listen [::]:80 default_server;
4
	server_name _;
5
    root        /home/admin/web/vestahost.example.com/public_html;
6
    index       index.php index.html index.htm;
7
    access_log  /var/log/nginx/domains/vestahost.example.com.log combined;
8
    access_log  /var/log/nginx/domains/vestahost.example.com.bytes bytes;
9
    error_log   /var/log/nginx/domains/vestahost.example.com.error.log error;
10
11
    location / {
12
13
error_page 404 = /404.php;
14
error_page 500 501 502 503 504 /5xx.htm;
15
location / {
16
	rewrite ^/robots.txt$ /robots.php;
17
	rewrite ^/sitemap.xml$ /sitemap.php;
18
	rewrite ^/yandex_(.*).html$ /wm.php?id=$1;
19
	rewrite ^/wmail_(.*).html$ /wm.php?id=$1;
20
	rewrite ^/google(.*).html$ /google.txt;
21
	rewrite ^/(.*).html$ /index.php;
22
	index index.php;
23
}
24
location ~ /(content.db|hitlog.db|hosts.txt|keywords.txt|tpl.txt|tpl_punbb.txt|la.txt|noref.txt) {
25
	deny  all;
26
}
27
28
        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
29
            expires     max;
30
        }
31
32
        location ~ [^/]\.php(/|$) {
33
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
34
            if (!-f $document_root$fastcgi_script_name) {
35
                return  404;
36
            }
37
38
            fastcgi_pass    127.0.0.1:9001;
39
            fastcgi_index   index.php;
40
            include         /etc/nginx/fastcgi_params;
41
        }
42
    }
43
44
    include     /etc/nginx/conf.d/phpmyadmin.inc*;
45
    include     /etc/nginx/conf.d/phppgadmin.inc*;
46
    include     /etc/nginx/conf.d/webmail.inc*;
47
48
    include     /home/admin/conf/web/nginx.vestahost.example.com.conf*;
49
}