fix nginx config?
This commit is contained in:
parent
1ecffc13b3
commit
42ebafd67c
@ -1,50 +1,52 @@
|
|||||||
server {
|
html {
|
||||||
server_name _;
|
server {
|
||||||
listen 80;
|
server_name _;
|
||||||
|
listen 80;
|
||||||
|
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_disable "msie6";
|
gzip_disable "msie6";
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
gzip_proxied any;
|
gzip_proxied any;
|
||||||
gzip_comp_level 8;
|
gzip_comp_level 8;
|
||||||
gzip_buffers 16 64k;
|
gzip_buffers 16 64k;
|
||||||
gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
|
|
||||||
root /var/www/html;
|
root /var/www/html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
|
||||||
client_max_body_size 500M;
|
client_max_body_size 500M;
|
||||||
|
|
||||||
# TCP optimizations
|
# TCP optimizations
|
||||||
tcp_nopush on;
|
tcp_nopush on;
|
||||||
tcp_nodelay on;
|
tcp_nodelay on;
|
||||||
|
|
||||||
# file shit
|
# file shit
|
||||||
sendfile on;
|
sendfile on;
|
||||||
|
|
||||||
# Keep connections alive for 15 seconds
|
# Keep connections alive for 15 seconds
|
||||||
keepalive_timeout 15;
|
keepalive_timeout 15;
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_pass unix:/var/run/php/php-fpm.sock;
|
fastcgi_pass unix:/var/run/php/php-fpm.sock;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
expires 7d;
|
expires 7d;
|
||||||
|
|
||||||
open_file_cache max=1000 inactive=60s;
|
open_file_cache max=1000 inactive=60s;
|
||||||
open_file_cache_valid 60s;
|
open_file_cache_valid 60s;
|
||||||
open_file_cache_min_uses 1;
|
open_file_cache_min_uses 1;
|
||||||
open_file_cache_errors on;
|
open_file_cache_errors on;
|
||||||
|
|
||||||
# Serve the file directly from disk
|
# Serve the file directly from disk
|
||||||
try_files $uri $uri/;
|
try_files $uri $uri/;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user