我已经成功地在我的nginx 1.6.2上设置了清漆4,它正在工作,但根据testing http://www.isvarnishworking.com/ 表明 Varnish看起来是在那个url上响应的,但是Cache-Control头的“max-age”值是小于1的,这意味着Varnish永远不会在这个url上从caching中提供内容。 最大年龄值看起来是:0 这可能是故意的,但是如果你想让Varnishcaching这个URL,你将不得不修复应用程序发送给Varnish的最大年龄值。 这意味着它不工作,但不是预期的,searchconfiguration文件,但由于清漆版本4的巨大变化那些configuration文件不起作用。 请帮帮我吧。 谢谢
我想限制访问/ wp-admin /到特定的IP甚至本地主机 这里描述 http://codex.wordpress.org/Brute_Force_Attacks#Limit_Access_to_wp-admin_by_IP 但似乎是个人网站 我想使它服务器范围广泛。 所以明显我会把.htaccess文件在主网页目录,但如何使path,所以它影响/ wp-admin /下面的所有网站
我使用APCcaching(通过W3 Total Cache插件)通过nginx / PHP5-FPM提供Wordpress页面。 Nginx通过端口9000上的TCP套接字与PHP-FPM进行通信。我已经通过sysctl调整了最大连接数为1024.我已经将max_execution_time(在php.ini中)和request_terminate_timeout(在FPM conf文件中)设置为30秒。 时不时地(每隔8-10个小时,而不是线性地),端口9000上的开放TCP连接数量增长到接近1000(主要是CLOSE_WAIT状态,一些FIN_WAIT,FIN_WAIT_2),有时会超过1000,并且我的Web服务器启动返回504错误。 一旦我终止该端口上的所有TCP连接并重新启动FPM,它就会再次正常工作。 我启用了缓慢的日志,看看发生了什么,如果我正确地阅读它,它挂在apc_store()调用。 这是一个APCconfiguration错误,还是我需要调整与FPM设置? 有没有办法强制这些TCP连接终止,即使脚本不发送最终的终止信号? 来自FPM慢日志的示例跟踪: [22-Jan-2015 09:42:49] [pool www] pid 20327 script_filename = /var/www/index.php [0x00007fdc527ec908] apc_store() /var/www/wp-content/plugins/w3-total-cache/lib/W3/Cache/Apc.php:55 [0x00007fdc527ec768] set() /var/www/wp-content/plugins/w3-total-cache/lib/W3/ObjectCache.php:254 [0x00007fdc527ec5e0] set() /var/www/wp-content/plugins/w3-total-cache/lib/W3/ObjectCache.php:300 [0x00007fdc527ec488] add() /var/www/wp-content/plugins/w3-total-cache/lib/W3/ObjectCacheBridge.php:73 [0x00007fdc527ec330] add() /var/www/wp-content/object-cache.php:94 [0x00007fdc527ec200] wp_cache_add() /var/www/wp-includes/option.php:176 [0x00007fdc527ec078] wp_load_alloptions() /var/www/wp-includes/functions.php:1272 [0x00007fdc527ebf40] is_blog_installed() /var/www/wp-includes/load.php:474 [0x00007fdc527ebdb0] wp_not_installed() /var/www/wp-settings.php:109 [0x00007fdc527ebc88] +++ dump failed
我有以下的堆栈: (redirecthttp为https =>)https nginx – > varnish – > nginx http – > php5-fpm 当我打开my.url.com时,我立即redirect到https://127.0.0.1 没有清漆,nginx,ssl,php5-fpm(php 5.5)工作得很好… 我认为它与我的清漆configuration有关,因为几乎相同的堆栈运行不同的CMS(TYPO3 Neos)和不同的清漆configuration就好了…(对于nginx的设置几乎是相同的,只是一些轻微的适应,如静态重写) 我很感激你的想法和反馈! 我的nginxconfiguration: # redirect non-www – http and other domains to www – https server { listen 80; ## listen for ipv4; this line is default and implied server_name domain.com some.other.tld; return 301 https://www.domain.com$request_uri; } # […]
用下面的方法挣扎一下。 为JS和CSS添加过期,加上其他静态文件很容易: # Directives to send expires headers. location ~* \.(?:css|js)$ { expires 28d; access_log off; add_header Cache-Control "public"; } 但是对于我喜欢的url,我不太清楚。 重写的URL如下所示: www.domain.tld/post-name 所以没有像.html或.php这样的扩展名,而主页只是一个/注意我的主页是静态的,没有最新的新闻/博客文章等,所以我也希望这个caching在浏览器中。 将过期添加到此位置块不会将浏览器caching添加到主页: location / { try_files $uri $uri/ /index.php?$args; expires 1d; } 在php文件位置添加过期(重写之前)也不起作用,Nginx似乎想要确切的请求的URI。 我已经看到了这个build议,但是对使用太多的if语句表示谨慎: location / { if (-f $request_filename) { expires 30d; break; } } 什么是最好的方法来确保这样一个简单的5页面网站获取所有的页面浏览器caching? 理想情况下不需要对url进行硬编码。 www.domain.tld / www.domain.tld / […]
一切运作良好,但我在扩展页面时遇到与WordPress的问题。 问题是,没有图片显示每个插件,当我点击巫婆插件的图片,我想要安装其打开窗户,但不显示图案,只是无限加载…但是,当我点击“安装button“,它安装好插件 你可以看这个图像看看会发生什么 发出Wordpress 这里的configuration: configuration 这里的networking服务器configuration: 前端Nginx server { listen 443 ssl; # SSL ssl on; ssl_certificate /etc/ssl/nginx/nginx.crt; ssl_certificate_key /etc/ssl/nginx/nginx.key; ssl_session_cache shared:SSL:40m; ssl_session_timeout 10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; server_name domaine.tld; # Proxy Pass to Varnish and Add headers to recognize SSL location / { proxy_pass http://127.0.0.1:80; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; […]
我在Windows Server 2008 R2 SP1上运行IIS7.5。 一个多月前,我做了PHP(v5.5.11),MySQL和phpMyAdmin接口的通用安装,并且它都很好。 有一天我开始玩WordPress的网站,这一切都变得很难看。 现在,在涉及PHP的任何网站上,我得到“500 – 内部服务器错误”(包括phpMyAdmin)或浏览器永远坐在那里“加载”,但没有收到任何数据,就好像它仍在尝试parsingURL。 我已经尝试安装Visual Studio 2012更新4的Visual C ++可再发行组件的32位版本,如下所示: 全新安装的IIS和PHP 500错误 我一整天都在扯掉我的头发。 任何帮助将非常感激!
在mywebsite.com上,我用wordpress运行docker容器。 我开始了 docker run -p 8000:80 –name docker-wordpress-nginx -d 和 docker ps 节目 0.0.0.0:8000->80/tcp 在我的主机上我有nginx运行 server { listen 80; … server_name mywebsite.com www.mywebsite.com; … location / { proxy_pass http://localhost:8000/; proxy_set_header Host $host; } 我故意运行docker容器为8000:80,因为我有我的主机的端口80上运行的其他东西。我login mywebsite.com:8000/wp-admin/ 和 http://mywebsite.com:8000/wp-admin/options-general.php 并从中更改了网站地址(URL) http://mywebsite.com:8000 至 http://mywebsite.com 所以,现在,我去这里之后: http://mywebsite.com/wp-admin/ 我在这里redirect: http://mywebsite.com:8000/wp-login.php?redirect_to=http%3A%2F%2Fmywebsite.com%2Fwp-admin%2F&reauth=1 而我login后,我显示此页面: http://mywebsite.com/wp-admin/ 我正确地看到它。 但是,如果我点击里面的任何链接,如“页面”链接,我有空白页面 File not Found 作为网页内容和地址栏显示: http://mywebsite.com/wp-admin/edit.php?post_type=page 另外,我试图login到pipe理界面 […]
我正在使用下面的nginx块来将mysite.com/blog路由到我的/ var / www / mysite / wordpress /目录: location /blog { root /var/www/mysite/wordpress; rewrite ^/blog/(.+)$ /$1 break; try_files $uri $uri/ /blog/index.php?q=$uri&$args; index index.php; location ~ \.php { fastcgi_pass 127.0.0.1:9000; include fastcgi_params; fastcgi_split_path_info ^(?:\/blog)(.+\.php)(.*); fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } 一切工作正常,除了mysite.com/blog/wp-admin/给我一个404错误。 访问mysite.com/blog/wp-admin/index.php按预期工作,所以它看起来像我的索引规则不起作用。 这里可能是什么问题?
我有一个使用font-awesome的网站,我想用cloudfront作为CDN(我的网站运行在apache上)。 我已经在这个网站的conf文件中启用了cors。 这里是我的网站的conf文件: <VirtualHost *:80> ServerAdmin [email protected] ServerName spotlessmommy.com ServerAlias www.spotlessmommy.com DocumentRoot /var/www/spotlessmommy <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/spotlessmommy> Options Indexes FollowSymLinks MultiViews AllowOverride ALL Order allow,deny allow from all Header set Access-Control-Max-Age "1000" Header set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding" Header set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" […]