Server-Setup

Server-Setup

Ich habe ein Problem mit Nginx Cache und WordPress.

Info: Nginx und WP funktionieren, aber wenn ich es mit dem Cache versuche, treten einige Probleme auf.

wenn aktiver Cache nginx

Protokoll nginx =

[alert] 19958#0: worker process 19963 exited on signal 9
[alert] 19958#0: worker process 19966 exited on signal 9
[alert] 19958#0: worker process 19961 exited on signal 9
[alert] 19958#0: worker process 19965 exited on signal 9
[alert] 19958#0: worker process 19970 exited on signal 9
[alert] 19958#0: worker process 19968 exited on signal 9
[alert] 19958#0: worker process 19962 exited on signal 9
[alert] 19958#0: worker process 19967 exited on signal 9
[alert] 19958#0: worker process 19959 exited on signal 9
[alert] 19958#0: worker process 19960 exited on signal 9
[alert] 19958#0: worker process 19969 exited on signal 9

Ich starte Apache und Nginx neu, gleiches Problem

Ich verstehe nicht, wo in meiner Konfiguration das Problem liegt.

Wenn mir jemand helfen könnte, wäre das sehr nett

nginx.conf

user www-data;
worker_processes 12;
pid /var/run/nginx.pid;

events {
        worker_connections 1024;
}

http {
        ##
        # Basic Settings
        ##
        limit_req_zone $binary_remote_addr zone=one:10m rate=5r/s;
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 60;
        types_hash_max_size 2048;
        set_real_ip_from 127.0.0.1;
        real_ip_header X-Forwarded-For;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;
        gzip_disable "msie6";

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}

verfügbare Sites - meinewebsite.com

Server-Setup

proxy_cache_path /home/mywebsite/cache/nginx levels=1:2 keys_zone=staticfilecache:180m
max_size=2500m;
proxy_read_timeout 170;
proxy_send_timeout 90;
proxy_cache_key "$scheme$host$request_uri";
upstream apache {
server 127.0.0.1:8080;
}

server {
listen 80;
server_name www.mywebsite.com;
access_log  /home/mywebsite/logs/access.log;
error_log   /home/mywebsite/logs/error.log;
add_header X-Cache-Status $upstream_cache_status;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "";
proxy_cache_valid 200 20m;
client_max_body_size       2090m;
proxy_connect_timeout      90;
proxy_buffer_size          2024k;
proxy_buffers               8 512k;
proxy_buffering                 on;
proxy_busy_buffers_size     2024k;
proxy_temp_file_write_size 2024k;
proxy_ignore_client_abort on;
proxy_http_version 1.1;

location / {
limit_req   zone=one burst=8 nodelay;
limit_rate 5000k;

# If logged in, don't cache.
if ($http_cookie ~* "comment_author_|wordpress_(?!test_cookie)|wp-postpass_" ) {
set $do_not_cache 1;
}
proxy_no_cache $do_not_cache;
proxy_cache_bypass $do_not_cache;
proxy_cache staticfilecache;
proxy_pass http://apache;
proxy_cache_valid 200 20m;
}

location ~* wp-.*.php|wp-admin {
proxy_pass http://apache;
}
location ~* .(jpg|png|gif|jpeg|css|js|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx|ico)$ {
proxy_cache staticfilecache;
proxy_pass http://apache;
proxy_cache_valid 200 120m;
expires 15552000;
}
location ~* /[^/]+/(feed|.xml)/? {
if ($http_cookie ~* "comment_author_|wordpress_(?!test_cookie)|wp-postpass_" ) {
set $do_not_cache 1;
}
proxy_no_cache $do_not_cache;
proxy_cache_bypass $do_not_cache;
proxy_cache staticfilecache;
proxy_pass http://apache;
proxy_cache_valid 200 45m;
expires 3600;
}
location = /50x.html {
root /var/www/nginx-default;
}
# No access to .htaccess files.
location ~ /.ht {
deny all;
}
}
## Listen banned IP addresses via blockips.conf   ##
 include blockips.conf;

verwandte Informationen