View difference between Paste ID: tRjEp8gP and LGDJYfnM
SHOW: | | - or go back to the newest paste.
1
user http;
2-
worker_processes  1;
2+
worker_processes 1;
3
4-
error_log  /var/log/nginx/error.log;
4+
error_log /var/log/nginx/error.log;
5
6
events {
7-
  worker_connections  4096;
7+
worker_connections 4096;
8
}
9
10
http {
11-
    access_log    /var/log/nginx/access.log;
11+
#include /etc/nginx/mime.types;
12
access_log /var/log/nginx/access.log;
13-
    include       /etc/nginx/conf/mime.types;
13+
14
sendfile on;
15-
    sendfile        on;
15+
keepalive_timeout 65;
16-
    keepalive_timeout  65;
16+
tcp_nodelay on;
17-
    tcp_nodelay        on;
17+
18
gzip on;
19-
    default_type  application/octet-stream;
19+
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
20
21-
    gzip  on;
21+
server {
22-
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";
22+
access_log /var/log/nginx/localhost.access.log;
23
24-
  server {
24+
listen 80;
25-
      access_log  /var/log/nginx/localhost.access.log;
25+
server_name localhost;
26
root /srv/http;
27-
      listen   80;
27+
28-
      server_name  localhost;
28+
## Default location
29-
      root   /srv/http;
29+
location / {
30
index index.php index.html;
31-
      ## Default location
31+
32-
      location / {
32+
33-
        index  index.php index.html;
33+
## Images and static content is treated different
34-
      }
34+
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
35
access_log off;
36-
      ## Images and static content is treated different
36+
expires 30d;
37-
      location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
37+
38-
        access_log        off;
38+
39-
        expires           30d;
39+
40-
      }
40+
location ~ ^(.+\.php)(.*)$ {
41
fastcgi_split_path_info ^(.+\.php)(.*)$;
42-
      location ~ \.css {
42+
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; 
43-
        add_header  Content-Type    text/css;
43+
fastcgi_index index.php;
44-
      }
44+
45
fastcgi_param PATH_INFO $fastcgi_path_info;
46-
      ## Include external php config
46+
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
47-
      include php.conf;
47+
48
fastcgi_param QUERY_STRING $query_string;
49-
      ## Disable viewing .htaccess & .htpassword
49+
fastcgi_param REQUEST_METHOD $request_method;
50-
      location ~ /\.ht {
50+
fastcgi_param CONTENT_TYPE $content_type;
51-
          deny  all;
51+
fastcgi_param CONTENT_LENGTH $content_length;
52-
      }
52+
53
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
54-
    }#end server
54+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
55
fastcgi_param REQUEST_URI $request_uri;
56-
} #end http
56+
fastcgi_param DOCUMENT_URI $document_uri;
57
fastcgi_param DOCUMENT_ROOT $document_root;
58-
# mail {
58+
fastcgi_param SERVER_PROTOCOL $server_protocol;
59-
#     # See sample authentication script at:
59+
60-
#     # http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript
60+
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
61-
# 
61+
fastcgi_param SERVER_SOFTWARE nginx;
62-
#     # auth_http localhost/auth.php;
62+
63-
#     # pop3_capabilities "TOP" "USER";
63+
fastcgi_param REMOTE_ADDR $remote_addr;
64-
#     # imap_capabilities "IMAP4rev1" "UIDPLUS";
64+
fastcgi_param REMOTE_PORT $remote_port;
65-
# 
65+
fastcgi_param SERVER_ADDR $server_addr;
66-
#     server {
66+
fastcgi_param SERVER_PORT $server_port;
67-
#         listen     localhost:110;
67+
fastcgi_param SERVER_NAME $server_name;
68-
#         protocol   pop3;
68+
69-
#         proxy      on;
69+
70-
#     }
70+
## Disable viewing .htaccess & .htpassword
71-
# 
71+
location ~ /\.ht {
72-
#     server {
72+
deny all;
73-
#         listen     localhost:143;
73+
74-
#         protocol   imap;
74+
75-
#         proxy      on;
75+
}#end server
76-
#     }
76+
77-
# }
77+
} #end http