View difference between Paste ID: uYDiW4Ri and mRySQ6yN
SHOW: | | - or go back to the newest paste.
1
server {
2
    listen	 80;
3
   # server_name  localhost;
4
    server_name 127.0.0.1;
5
6
    #charset koi8-r;
7
    #access_log  /var/log/nginx/log/host.access.log  main;
8
9
    root   /usr/share/nginx/html;
10
    index index.php index.html index.htm;
11
12
    location / {
13
       # root   /usr/share/nginx/html;
14
       # index  index.html index.htm index.php;
15
        try_files $uri $uri/ = 404;
16
    }
17
18-
    error_page 404 /404.html;
18+
     location ~ \.php$ {
19-
    error_page 500 502 503 504 /50x.html;
19+
        try_files $uri =404;
20-
#    location = /50x.html {
20+
        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
21-
#        root /usr/share/nginx/html;
21+
        fastcgi_index index.php;
22-
#    }
22+
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
23
        include fastcgi_params;
24-
#    location ~ \.php${
24+
25-
#        try_files $uri =404;
25+
26-
#        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
26+
27-
#        fastcgi_index index.php;
27+
28-
#        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
28+
29-
       # include fastcgi_params;
29+
30-
#    }
30+
31
        root   /usr/share/nginx/html;
32
    }
33
34
    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
35
    #
36
    #location ~ \.php$ {
37
    #    proxy_pass   http://127.0.0.1;
38
    #}
39
40
    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
41
    #
42
    #location ~ \.php$ {
43
    #    root           html;
44
    #    fastcgi_pass   127.0.0.1:9000;
45
    #    fastcgi_index  index.php;
46
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
47
    #    include        fastcgi_params;
48
    #}
49
    # deny access to .htaccess files, if Apache's document root
50
    # concurs with nginx's one
51
    #
52
    #location ~ /\.ht {
53
    #    deny  all;
54
    #}
55
}