Ich habe auf meinem VPS Nginx + Varnish aufgesetzt. Seit dem kann ich mich nicht mehr einloggen.
Bei der Eingabe http://www.alexextra.com/wp-admin oder http://www.alexextra.com/wp-login.php popt das Browserfenster auf, um Datei local zu öffnen. Hat jemand eine Idee, an welcher Stelle meine Config falsch ist?
nginx.conf Code
Code
user nginx;
worker_processes 1;
pid /var/run/nginx.pid;
# [ debug | info | notice | warn | error | crit ]
error_log /var/log/nginx.error_log info;
events {
worker_connections 1024;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
index index.html index.php;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
log_format download '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$http_range" "$sent_http_content_range"';
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
# upload_max_filesize = 2M (default)
client_max_body_size 20M;
client_header_buffer_size 1k;
large_client_header_buffers 4 4k;
gzip on;
gzip_disable "msie6";
gzip_proxied any;
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.1;
gzip_min_length 1024;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/json
application/javascript
application/x-javascript
application/xml
application/atom+xml
application/xml+rss;
gzip_vary on;
# To hide nginx version
server_tokens off;
output_buffers 1 32k;
postpone_output 1460;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
# lingering_time 30;
# lingering_timeout 10;
# reset_timedout_connection on;
### If Varnish is used as front end
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
# Default value: on
port_in_redirect off;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
}
Alles anzeigen
Wordpress Config
Code
# Start alexextra.com
server {
listen 8080;
server_name alexextra.com www.alexextra.com;
root /var/www/vhosts/alexextra.com/httpdocs;
access_log /var/log/nginx/www.alexextra.com-access_log;
error_log /var/log/nginx/www.alexextra.com-error_log;
# DEFAULT INDEX
index index.php;
## SECURITY
if ( $request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
}
location ~ /(\.|wp-config.php|liesmich.html|readme.html) {
return 444;
}
## REWRITES
location ~ ^/(\d+)/$ {
return 301 /?p=$1;
}
location / {
if (-f $request_filename) {
break;
}
set $pgcache "";
if ($request_method = GET) { set $pgcache "${pgcache}D"; }
if ($args = "") { set $pgcache "${pgcache}I"; }
if ($http_cookie !~ (comment_author_|wordpress|wordpress_logged_in|wp-postpass_)) {
set $pgcache "${pgcache}S";
}
if (-f $document_root/wp-content/w3tc/pgcache/$request_uri/_index.html) {
set $pgcache "${pgcache}K";
}
if ($pgcache = "DISK") {
rewrite ^ /wp-content/w3tc/pgcache/$request_uri/_index.html break;
}
if (!-e $request_filename) { rewrite . /index.php last; }
}
fastcgi_intercept_errors off;
# Also to fix updates and upgrades of plugins, themes, and WP core
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
## AUTH ADMIN
location = /wp-login.php {
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/htpasswd;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
}
#location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
# expires 30d;
# add_header Pragma public;
# add_header Cache-Control "public, must-revalidate, proxy-revalidate";
# log_not_found off;
#}
# Aggressive caching for static files
# If you alter static files often, please use
# add_header Cache-Control "max-age=31536000, public, must-revalidate, proxy-revalidate";
location ~* \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|ogv|otf|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|t?gz|tif|tiff|ttf|wav|webm|wma|woff|wri|xla|xls|xlsx|xlt|xlw|zip)$ {
expires 31536000s;
access_log off;
log_not_found off;
add_header Pragma public;
add_header Cache-Control "max-age=31536000, public";
}
# include
location = /favicon.ico { access_log off; log_not_found off; }
location ~ /\. { deny all; access_log off; log_not_found off; }
# Set expires for static files
location ~* \.(?:css|js|ico|svg)$ {
add_header Cache-Control "max-age=2678400, public";
}
# Web fonts needs some special care
# Reference: http://jmoiron.net/blog/serving-fonts-aws-cloudfront/
location ~* \.(?:ttf|eot|woff|otf)$ {
### Comment the following line, if you do NOT use an external URL to serve webfonts
add_header Access-Control-Allow-Origin "*";
add_header Cache-Control "max-age=2678400, public";
}
# Deny access to hidden files
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# Referers for images
location ~ \.(?:jpg|jpeg|gif|png)$ {
### Please change the domainname before uncommenting the following
# valid_referers none blocked www.domainname.com domainname.com;
# if ($invalid_referer) { return 403; }
add_header Cache-Control "max-age=2678400, public";
}
# Yoast's WordPress SEO plugin requires this...
# Ref: http://wordpress.org/extend/plugins/wordpress-seo/faq/
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
}
# End alexextra.com
Alles anzeigen