I can`t connect my website after reinstall . just this message or download index.php ------------------------------------------------------------------------------------ Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require( dirname( __FILE__ ) . '/wp-blog-header.php' ); ------------------------------------------------------------------------------------ i`m using centos7 + centmin123.09beta01 + php 7.0.11 + wordpress + wp-ffpc and wordpress in public directory ------------------------------------------------------------------------------------------- curl -I Website Hosting - Mysite.com HTTP/1.1 200 OK Date: Sun, 23 Oct 2016 17:36:25 GMT Content-Type: text/html;charset=utf-8 Vary: Accept-Encoding Last-Modified: Sun, 23 Oct 2016 14:31:09 GMT X-Pingback: http://mysite.com/xmlrpc.php X-Cache-Engine: WP-FFPC with memcached via PHP Server: nginx centminmod X-Powered-By: centminmod Expires: Sun, 30 Oct 2016 17:36:25 GMT Cache-Control: public, max-age=604800, stale-while-revalidate=240, stale-if-error=600 X-Varnish: 131677 6 Age: 59098 Via: 1.1 varnish-v4 X-Cache: HIT X-Cache-Hits: 84 Accept-Ranges: bytes Connection: keep-alive -------------------------------------------------------------------------------------------- how fix it?
Did you setup Varnish cache, i see varnish headers in your output ? You'd be on your own troubleshooting Varnish Cache setup and configuration. So if unsure, i'd remove Varnish Cache. WP-FFPC can be buggy. Probably better to use KeyCDN Cache Enabler plugin Not processing php files could be due to messed or or misconfigured nginx vhost you should ensure the php.conf include file generated with nginx vhost is left enabled as it processes php files Also how did you install wordpress ? via centmin.sh menu option 23 or manually yourself ? Outline your steps. When you create a new nginx vhost domain via centmin.sh menu option 2 or menu option 22 or via /usr/bin/nv cli command line, you will create the Nginx vhost files and directories. You will get an outputted the path location where it will create the domain name's vhost conf file named newdomain.com.conf (and newdomain.com.ssl.conf if you selected yes to self signed SSL) Nginx vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.conf Nginx HTTP/2 SSL vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf Nginx Self-Signed SSL Certificate Directory at /usr/local/nginx/conf/ssl/newdomain.com Vhost public web root will be at /home/nginx/domains/newdomain.com/public Vhost log directory will be at /home/nginx/domains/newdomain.com/log Please post the contents of /usr/local/nginx/conf/conf.d/newdomain.com.conf and if applicable /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf wrapped in CODE tags (outlined at How to use forum BBCODE code tags)
I create a vhost domain via centmin.sh menu option 2 and wordpress install myself use FTP. conf files and directory location is ok Code: # Centmin Mod Getting Started Guide # must read http://centminmod.com/getstarted.html # redirect from non-www to www # uncomment, save file and restart Nginx to enable # if unsure use return 302 before using return 301 #server { # listen 80; # server_name mydomain.com; # return 301 $scheme://www.mydomain.com$request_uri; # } server { server_name mydomain.com www.mydomain.com; # ngx_pagespeed & ngx_pagespeed handler #include /usr/local/nginx/conf/pagespeed.conf; #include /usr/local/nginx/conf/pagespeedhandler.conf; #include /usr/local/nginx/conf/pagespeedstatslog.conf; #add_header X-Frame-Options SAMEORIGIN; #add_header X-Xss-Protection "1; mode=block" always; #add_header X-Content-Type-Options "nosniff" always; # limit_conn limit_per_ip 16; # ssi on; access_log /home/nginx/domains/mydomain.com/log/access.log main_ext buffer=256k flush=60m; error_log /home/nginx/domains/mydomain.com/log/error.log; include /usr/local/nginx/conf/autoprotect/mydomain.com/autoprotect-javtouch.com.conf; root /home/nginx/domains/mydomain.com/public; # uncomment cloudflare.conf include if using cloudflare for # server and/or vhost site #include /usr/local/nginx/conf/cloudflare.conf; include /usr/local/nginx/conf/503include-main.conf; # prevent access to ./directories and files #location ~ (?:^|/)\. { # deny all; #} include /usr/local/nginx/conf/wpsecure.conf; include /usr/local/nginx/conf/wpnocache.conf; location / { include /usr/local/nginx/conf/503include-only.conf; # block common exploits, sql injections etc #include /usr/local/nginx/conf/block.conf; # Enables directory listings when index file not found #autoindex on; # Shows file listing times as local time #autoindex_localtime on; # Enable for vBulletin usage WITHOUT vbSEO installed # More example Nginx vhost configurations at # http://centminmod.com/nginx_configure.html # try_files $uri $uri/ /index.php; try_files $uri $uri/ @memcached; } include /usr/local/nginx/conf/wpffpc.conf; include /usr/local/nginx/conf/staticfiles.conf; include /usr/local/nginx/conf/php.conf; include /usr/local/nginx/conf/drop.conf; #include /usr/local/nginx/conf/errorpage.conf; include /usr/local/nginx/conf/vts_server.conf; } Code: # Centmin Mod Getting Started Guide # must read http://centminmod.com/getstarted.html # For SPDY SSL Setup # read http://centminmod.com/nginx_configure_https_ssl_spdy.html # redirect from www to non-www forced SSL # uncomment, save file and restart Nginx to enable # if unsure use return 302 before using return 301 # server { # listen 80; # server_name mydomain.com www.mydomain.com; # return 302 https://$server_name$request_uri; # } server { listen 443 ssl http2; server_name mydomain.com www.mydomain.com; ssl_dhparam /usr/local/nginx/conf/ssl/mydomain.com/dhparam.pem; ssl_certificate /usr/local/nginx/conf/ssl/mydomain.com/mydomain.com.crt; ssl_certificate_key /usr/local/nginx/conf/ssl/mydomain.com/mydomain.com.key; include /usr/local/nginx/conf/ssl_include.conf; http2_max_field_size 16k; http2_max_header_size 32k; # mozilla recommended ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+ECDSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+SHA384:EECDH+AES128:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!CAMELLIA; ssl_prefer_server_ciphers on; #add_header Alternate-Protocol 443:npn-spdy/3; # before enabling HSTS line below read centminmod.com/nginx_domain_dns_setup.html#hsts #add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; #add_header X-Frame-Options SAMEORIGIN; #add_header X-Xss-Protection "1; mode=block" always; #add_header X-Content-Type-Options "nosniff" always; #spdy_headers_comp 5; ssl_buffer_size 1369; ssl_session_tickets on; # enable ocsp stapling #resolver 8.8.8.8 8.8.4.4 valid=10m; #resolver_timeout 10s; #ssl_stapling on; #ssl_stapling_verify on; #ssl_trusted_certificate /usr/local/nginx/conf/ssl/mydomain.com/mydomain.com-trusted.crt; # ngx_pagespeed & ngx_pagespeed handler #include /usr/local/nginx/conf/pagespeed.conf; #include /usr/local/nginx/conf/pagespeedhandler.conf; #include /usr/local/nginx/conf/pagespeedstatslog.conf; # limit_conn limit_per_ip 16; # ssi on; access_log /home/nginx/domains/mydomain.com/log/access.log main_ext buffer=256k flush=60m; error_log /home/nginx/domains/mydomain.com/log/error.log; include /usr/local/nginx/conf/autoprotect/javtouch.com/autoprotect-mydomain.com.conf; root /home/nginx/domains/mydomain.com/public; # uncomment cloudflare.conf include if using cloudflare for # server and/or vhost site #include /usr/local/nginx/conf/cloudflare.conf; include /usr/local/nginx/conf/503include-main.conf; # prevent access to ./directories and files #location ~ (?:^|/)\. { # deny all; #} location / { include /usr/local/nginx/conf/503include-only.conf; # block common exploits, sql injections etc #include /usr/local/nginx/conf/block.conf; # Enables directory listings when index file not found #autoindex on; # Shows file listing times as local time #autoindex_localtime on; # Enable for vBulletin usage WITHOUT vbSEO installed # More example Nginx vhost configurations at # http://centminmod.com/nginx_configure.html #try_files $uri $uri/ /index.php; } include /usr/local/nginx/conf/staticfiles.conf; include /usr/local/nginx/conf/php.conf; include /usr/local/nginx/conf/drop.conf; #include /usr/local/nginx/conf/errorpage.conf; include /usr/local/nginx/conf/vts_server.conf; }
the mydomain.com.ssl.conf version of your web root location / is missing the try_files line like you have in non-https mydomain.com.conf but that isn't related to above error if you curl the non-https site and visited non-https site so you followed the guide at Nginx Wordpress + WP-FFPC Plugin + ngx_pagespeed - CentminMod.com LEMP Nginx web stack for CentOS ? also no idea why you have varnish cache headers in your curl header check ? Code (Text): X-Varnish: 131677 6 Age: 59098 Via: 1.1 varnish-v4 Probably better to switch to or use keycdn cache enabler. You can try manually switching to keycdn cacher enabler Wordpress - WP Cacher Enabler Plugin by KeyCDN folks
yes I installed varnish and followed Nginx Wordpress + WP-FFPC Plugin + ngx_pagespeed - CentminMod.com LEMP Nginx web stack for CentOS guide. I will try reinstall Wordpress - WP Cacher Enabler Plugin by KeyCDN folks guide. and varnish is not good? remove?
installing varnish cache doesn't do anything unless you configure varnish vcl rules for your specific web app to tell varnish cache what to cache and what not to cache etc. So unless you know your way around varnish cache and vcl configurations, i'd remove varnish cache.
ahh i can`t config. so just googling and ctrl v Code: sub vcl_recv { /* # If we host multiple domains on a server, here you can list the domains you DO NOT want to cache # The first check matches both naked & "www" subdomains. Use the second for non generic subdomains. if ( req.http.host ~ "(www\.)?(domain1.com|domain2.org|domain3.net)" || req.http.host ~ "(subdomain.domain4.tld|othersubdomain.domain5.tld)" ) { return (pass); } */ # Forward client's IP to the backend if (req.restarts == 0) { if (req.http.X-Real-IP) { set req.http.X-Forwarded-For = req.http.X-Real-IP; } else if (req.http.X-Forwarded-For) { set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; # In Varnish 4.x, comment the above line & uncomment the following #set req.http.X-Forwarded-For = req.http.X-Forwarded-For ", " client.ip; } else { set req.http.X-Forwarded-For = client.ip; } } # httpoxy unset req.http.proxy; # Non-RFC2616 or CONNECT which is weird. if ( req.method != "GET" && req.method != "HEAD" && req.method != "PUT" && req.method != "POST" && req.method != "TRACE" && req.method != "OPTIONS" && req.method != "DELETE" ) { return (pipe); } # We only deal with GET and HEAD by default if (req.method != "GET" && req.method != "HEAD") { return (pass); } # Don't cache HTTP authorization/authentication pages and pages with certain headers or cookies if ( req.http.Authorization || req.http.Authenticate || req.http.X-Logged-In == "True" || req.http.Cookie ~ "userID" || req.http.Cookie ~ "joomla_[a-zA-Z0-9_]+" || req.http.Cookie ~ "(wordpress_[a-zA-Z0-9_]+|wp-postpass|comment_author_[a-zA-Z0-9_]+)" ) { return (pass); } # Exclude the following paths (e.g. backend admins, user pages or ad URLs that require tracking) # In Joomla specifically, you are advised to create specific entry points (URLs) for users to # interact with the site (either common user logins or even commenting), e.g. make a menu item # to point to a user login page (e.g. /login), including all related functionality such as # password reset, email reminder and so on. if( req.url ~ "^/administrator" || req.url ~ "^/component/banners" || req.url ~ "^/component/users" || req.url ~ "^/wp-admin" || req.url ~ "^/wp-login.php" || req.url ~ "^/any-other-url-path" ) { return (pass); } # Don't cache ajax requests if(req.http.X-Requested-With == "XMLHttpRequest" || req.url ~ "nocache") { return (pass); } # Check for the custom "X-Logged-In" header (used by K2 and other apps) to identify # if the visitor is a guest, then unset any cookie (including session cookies) provided # it's not a POST request. if(req.http.X-Logged-In == "False" && req.method != "POST"){ unset req.http.Cookie; } # Properly handle different encoding types if (req.http.Accept-Encoding) { if (req.url ~ "\.(jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf)$") { # No point in compressing these unset req.http.Accept-Encoding; } elseif (req.http.Accept-Encoding ~ "gzip") { set req.http.Accept-Encoding = "gzip"; } elseif (req.http.Accept-Encoding ~ "deflate") { set req.http.Accept-Encoding = "deflate"; } else { # unknown algorithm (aka crappy browser) unset req.http.Accept-Encoding; } } # Cache files with these extensions if (req.url ~ "\.(js|css|jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf)$") { return (hash); } return (hash); } sub vcl_backend_response { /* # If we host multiple domains on a server, here you can list the domains you DO NOT want to cache # The first check matches both naked & "www" subdomains. Use the second for non generic subdomains. if ( bereq.http.host ~ "(www\.)?(domain1.com|domain2.org|domain3.net)" || bereq.http.host ~ "(subdomain.domain4.tld|othersubdomain.domain5.tld)" ) { set beresp.uncacheable = true; return (deliver); } */ # Exclude the following paths (e.g. backend admins, user pages or ad URLs that require tracking) # In Joomla specifically, you are advised to create specific entry points (URLs) for users to # interact with the site (either common user logins or even commenting), e.g. make a menu item # to point to a user login page (e.g. /login), including all related functionality such as # password reset, email reminder and so on. if( bereq.url ~ "^/administrator" || bereq.url ~ "^/component/banners" || bereq.url ~ "^/component/users" || bereq.url ~ "^/wp-admin" || bereq.url ~ "^/wp-login.php" || bereq.url ~ "^/any-other-url-path" ) { set beresp.uncacheable = true; return (deliver); } # Don't cache HTTP authorization/authentication pages and pages with certain headers or cookies if ( bereq.http.Authorization || bereq.http.Authenticate || bereq.http.X-Logged-In == "True" || bereq.http.Cookie ~ "userID" || bereq.http.Cookie ~ "joomla_[a-zA-Z0-9_]+" || bereq.http.Cookie ~ "(wordpress_[a-zA-Z0-9_]+|wp-postpass|comment_author_[a-zA-Z0-9_]+)" ) { set beresp.uncacheable = true; return (deliver); } # Don't cache ajax requests if(beresp.http.X-Requested-With == "XMLHttpRequest" || bereq.url ~ "nocache") { set beresp.uncacheable = true; return (deliver); } # Don't cache backend response to posted requests if (bereq.method == "POST") { set beresp.uncacheable = true; return (deliver); } # Ok, we're cool & ready to cache things # so let's clean up some headers and cookies # to maximize caching. # Check for the custom "X-Logged-In" header to identify if the visitor is a guest, # then unset any cookie (including session cookies) provided it's not a POST request. if(bereq.method != "POST" && beresp.http.X-Logged-In == "False") { unset beresp.http.Set-Cookie; } # Allow items to be stale if needed (this value should be the same as with "set req.grace" # inside the sub vcl_recv {…} block (the 2nd part of the if/else statement) set beresp.grace = 1h; # Serve pages from the cache should we get a sudden error and re-check in 3 minutes if (beresp.status == 503 || beresp.status == 502 || beresp.status == 501 || beresp.status == 500) { set beresp.grace = 3m; return (retry); } # This is how long Varnish will keep cached content. # If you change it, remember to adjust "beresp.http.Cache-Control" lower and # "req.grace" in the vcl_recv() section set beresp.ttl = 604800s; //캐시만료1주일 # OPTIONAL: # Nice trick from https://www.varnish-cache.org/trac/wiki/VCLExampleIgnoreCacheHeadersFromBackend # Essentially caches anything with a cache time lower than the specified time. # May not work on all cases so use with caution. #if (beresp.ttl < 2m) { # set beresp.ttl = 2m; #} # Unset the "etag" header (suggested) unset beresp.http.etag; # Unset the "pragma" header unset beresp.http.Pragma; # Modify "expires" header - https://www.varnish-cache.org/trac/wiki/VCLExampleSetExpires set beresp.http.Expires = "" + (now + beresp.ttl); # If your backend server does not set the right caching headers for static assets, # you can set them below (uncomment first and change 604800 - which 1 week - to whatever you # want (in seconds) #if (req.url ~ "\.(ico|jpg|jpeg|gif|png|bmp|webp|tiff|svg|svgz|pdf|mp3|flac|ogg|mid|midi|wav|mp4|webm|mkv|ogv|wmv|eot|otf|woff|ttf|rss|atom|zip|7z|tgz|gz|rar|bz2|tar|exe|doc|docx|xls|xlsx|ppt|pptx|rtf|odt|ods|odp)(\?[a-zA-Z0-9=]+)$") { # set beresp.http.Cache-Control = "public, max-age=604800"; #} # We have content to cache, but it's got no-cache or other Cache-Control values sent # So let's reset it to our main caching time (2m as used in this example configuration) # The additional parameters specified (stale-while-revalidate & stale-if-error) are used # by modern browsers to better control caching. Set there to twice & five times your main # cache time respectively. # This final setting will normalize CMSs like Joomla which set max-age=0 even when # Joomla's cache is enabled. if (beresp.http.Cache-Control !~ "max-age" || beresp.http.Cache-Control ~ "max-age=0"){ set beresp.http.Cache-Control = "public, max-age=604800, stale-while-revalidate=240, stale-if-error=600"; //캐시만료1주일 } return (deliver); } sub vcl_deliver { /* # Send a special header for excluded domains only # The if statement can be identical to the ones in the vcl_recv() and vcl_fetch() functions above if ( req.http.host ~ "(www\.)?(domain1.com|domain2.org|domain3.net)" || req.http.host ~ "(subdomain.domain4.tld|othersubdomain.domain5.tld)" ) { set resp.http.X-Domain-Status = "EXCLUDED"; } # Enforce redirect to HTTPS for specified domains only if ( req.http.host ~ "(subdomain.domain4.tld|othersubdomain.domain5.tld)" && req.http.X-Forwarded-Proto !~ "(?i)https" ) { set resp.http.Location = "https://" + req.http.host + req.url; set resp.status = 302; } */ # Send special headers that indicate the cache status of each web page if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; set resp.http.X-Cache-Hits = obj.hits; } else { set resp.http.X-Cache = "MISS"; } return (deliver); } # Called if the cache has a copy of the page. sub vcl_hit { if (req.method == "PURGE") { ban(req.url); return (synth(200, "Purged")); } if (!obj.ttl > 0s) { return (pass); } } # Called if the cache does not have a copy of the page. sub vcl_miss { if (req.method == "PURGE") { return (synth(200, "Not in cache")); } }
cut and pastes without understanding varnish cache vcl isn't recommended Centmin Mod is provide as is, so short of scripted related bugs or issues, any further optimisation to the web stack components - nginx, php-fpm, mariadb mysql, csf firewall etc or web app specific configurations are left to the Centmin Mod user to deal with. So I do not provide any free support for such like Varnish cache configuration. However, Centmin Mod users are free to help each other out and ask questions or give answers on this community forum. My hopes are that this community forum evolves so that more veteran long time Centmin Mod users help new Centmin Mod users out
When i have some time (huh, joke at present) I'm going to have a play with varnish cache (used varnish for last 4 years on an apache server) on wordpress and centmin stack and get the vcl files running nicely - it wont be this year though....