Browse Source

Change Nginx Conf Files

old-stable
Mitesh Shah 12 years ago
parent
commit
98fe70cbb7
  1. 7
      etc/nginx/common/locations.conf
  2. 3
      usr/share/easyengine/nginx/html/basic.conf
  3. 3
      usr/share/easyengine/nginx/wpsingle/basic.conf
  4. 19
      usr/share/easyengine/nginx/wpsingle/w3tc.conf

7
etc/nginx/common/locations.conf

@ -13,6 +13,13 @@ location = /robots.txt {
log_not_found off;
}
# Cache Static Files For As Long As Possible
location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
log_not_found off;
expires max;
}
# PMA Settings
location /phpmyadmin {
root /usr/share/;

3
usr/share/easyengine/nginx/html/basic.conf

@ -13,4 +13,5 @@ server {
}
include /etc/nginx/common/locations.conf;
}
}

3
usr/share/easyengine/nginx/wpsingle/basic.conf

@ -18,4 +18,5 @@ server {
}
include /etc/nginx/common/locations.conf;
}
}

19
usr/share/easyengine/nginx/wpsingle/w3tc.conf

@ -1,4 +1,5 @@
server {
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.access.log;
@ -13,6 +14,7 @@ server {
if ($request_method = POST) {
set $cache_uri 'null cache';
}
if ($query_string != "") {
set $cache_uri 'null cache';
}
@ -29,22 +31,15 @@ server {
# Use cached or actual file if they exists, otherwise pass request to WordPress
location / {
#try_files /wp-content/w3tc/pgcache/$cache_uri/_index.html $uri $uri/ /index.php?$args;
try_files /wp-content/cache/page_enhanced/$http_host/$cache_uri/_index.html $uri $uri/ /index.php?$args;
try_files /wp-content/cache/page_enhanced/$http_host/_index.html $uri $uri/ /index.php?$args;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
location ~ .php$ {
try_files $uri /index.php;
include fastcgi_params;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass php;
}
# Cache static files for as long as possible
location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
expires max; log_not_found off; access_log off;
}
}
include /etc/nginx/common/locations.conf;
}
Loading…
Cancel
Save