Skip to content

Commit 06139bb

Browse files
committed
wordpress: apply log_not_found more widely
The vast majority of /var/log/nginx/error.log is filled with this: > open() "/srv/wordpress/sites/api_jquerymobile_com/gw-resources/api.jquerymobile.com/buttonMarkup/index.html" > failed (2: No such file or directory), > client: XXX, > server: api.jquerymobile.com, > request: "GET /resources/buttonMarkup/index.html HTTP/1.1", > host: "api.jquerymobile.com" > open() "/srv/wordpress/sites/jqueryui_com/gw-resources/jqueryui.com/demos/datepicker/datepicker-fr.js" > failed (2: No such file or directory), > client: XXX, > server: jqueryui.com, > request: "GET /resources/demos/datepicker/datepicker-fr.js HTTP/1.1", > host: "jqueryui.com"
1 parent 76c455a commit 06139bb

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

modules/profile/templates/testswarm/server/site.nginx.erb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ server {
1414

1515
access_log /var/log/nginx/access.log;
1616
error_log /var/log/nginx/error.log crit;
17+
log_not_found off;
1718
server_tokens off;
1819

1920
location ~* ^(/cache|/config|/inc|/scripts) {
@@ -23,7 +24,6 @@ server {
2324
# Prevent hidden "dotfiles" from being served
2425
location ~ /\. {
2526
access_log off;
26-
log_not_found off;
2727
deny all;
2828
}
2929

@@ -59,7 +59,6 @@ server {
5959
# Directives to send expires headers and turn off 404 error logging.
6060
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
6161
expires 24h;
62-
log_not_found off;
6362
}
6463

6564
location ~ \.php$ {

modules/wordpress/templates/site/site.nginx.erb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ server {
1313

1414
access_log off;
1515
error_log /var/log/nginx/error.log;
16+
log_not_found off;
1617
server_tokens off;
1718

1819
# Prevent hidden "dotfiles" from being served
1920
location ~ /\. {
2021
access_log off;
21-
log_not_found off;
2222
deny all;
2323
}
2424

@@ -32,19 +32,16 @@ server {
3232

3333
location = /favicon.ico {
3434
access_log off;
35-
log_not_found off;
3635
try_files /wp-content/themes/<%= @active_theme %>/i/favicon.ico /wp-content/themes/jquery/i/favicon.ico;
3736
}
3837

3938
location = /robots.txt {
4039
access_log off;
41-
log_not_found off;
4240
try_files $uri /wp-content/themes/<%= @active_theme %>/robots.txt;
4341
}
4442

4543
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
4644
expires 24h;
47-
log_not_found off;
4845
}
4946

5047
location / {

modules/wordpress/templates/site/subsite.nginx.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ location ~ ^<%= @path %>resources/(?<name>.*) {
77
location ^~ <%= @path %> {
88
root <%= @webroot %>/;
99
try_files $uri $uri/ <%= @path %>index.php$is_args$args;
10+
log_not_found off;
1011

1112
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
1213
expires 24h;
13-
log_not_found off;
1414
}
1515

1616
location ~ \.php$ {

0 commit comments

Comments
 (0)