Articles of apache 2.2

Apache为某些MP3返回206

我们正在尝试从web1.cowbird.com提供MP3文件。 大多数情况下,一切正常。 但是,有时候有一个浏览器无法播放的文件,我不知道为什么。 这是一个例子: http : //web1.cowbird.com/items/stories/2012/11/04/05/18/47222/1_5095f977b4f532.99916135-original.mp3 如果你wget或curl的文件,它工作正常。 但是试图在Chrome或Firefox中使用它会导致出现一些奇怪的错误,因为某些原因,浏览器没有下载整个文件,因此无法播放它。 出于某种原因,浏览器似乎在第一个请求中获得200结果,然后使用Range:bytes = 0-头创build另一个请求。 响应标题看起来是正确的,但没有足够的字节正在传输。 我一直在寻找所有试图了解是否它与字节范围请求,并尝试了各种Apache设置没有运气。 很乐意提供任何额外的信息。 谢谢!

亚马逊Linux LAMP与PHP 5.5

我通过这里的说明在我的Amazon Linux VPS上安装了PHP 5.5。 CLI工作正常。 我也有安装Apache并通过httpd包运行。 它运行没有任何问题。 我看到可用模块列表中没有mod_php 。 现在,当我尝试重新启动httpd我得到的错误: httpd:/etc/httpd/conf/httpd.conf第222行的语法错误:/etc/httpd/conf.d/php.conf第6行的语法错误:无法加载/etc/httpd/modules/libphp5.so到服务器:/etc/httpd/modules/libphp5.so:符号SSLeay_version,版本OPENSSL_1.0.1未在文件libcrypto.so.10中定义,带有链接时间参考 我查了这个错误的一部分,一般的build议似乎是运行 yum update openssl 但是,当我运行这个我只是得到: 没有包标记为更新 当我运行install而不是update ,我得到: 套件1:已经安装了openssl-1.0.1e-4.55.amzn1.x86_64和最新版本 没事做 我不确定在这一点上还有什么要做的。

别名一个url到另一个

我有一个运行的mod-wsgi脚本,它是别名/test 。 我想将URL /prod别名为/test 。 所以基本上, /test加载,但URL说/prod 。 这是一个单页面的应用程序。 有什么办法可以做到这一点?

谁或什么是从我的服务器(CentOS / Apache / suPHP)发送垃圾邮件

我的服务器正在发送大量的垃圾邮件,现在我search了几个小时的问题。 谷歌search后,我find了一个论坛,他们谈论这个,并提到深入到日志,所以我做了,发现电子邮件发送:[用户名] @ vps1。[主机名]。[tld]。 在论坛上他们说这些电子邮件可能是从我的服务器发送的,因为这不是一个使用的电子邮件地址。 他们还提到挖掘到PHP日志。 我试过这个,但找不到任何东西,所以通过电子邮件标题,我现在试图检测发送所有这些电子邮件的脚本。 我现在被卡住了 我已经通过添加以下规则更改了php.ini: mail.add_x_header = On mail.log = /var/log/phpmail.log 另外我通过添加这行添加了exim.conf : +arguments \ 重新启动exim和apache,但是在exim日志中没有看到任何X-PHP-Script头文件,并且php邮件日志没有被创build。 只有我看到的是在exim日志中的X标题: X=TLSv1:RC4-SHA:128 任何人都可以告诉我下一步该做什么? 编辑 以下是来自exim日志的一些行: bash-3.2# cat /var/log/exim/mainlog | grep 1W9FsC-0003qq-S2 2014-01-31 16:19:16 1W9FsC-0003qq-S2 <= [email protected] U=instijl P=local S=816 T="Re: It's good to see you," from <[email protected]> for [email protected] 2014-01-31 16:19:16 cwd=/var/spool/exim 3 args: /usr/sbin/exim […]

多个虚拟主机不在Apache工作

我正在用Apache2,MySQL,PHPconfiguration一个VPS。 主要网站工作正常。 然后我去创build一个带有子域名的networking邮件。 每当有人浏览webmail.mydomain.com,他或她应该有Webmaillogin屏幕。 我创build了另一个虚拟主机,并通过a2ensite启用它。 然后重新加载Apache。 同时,我认为这将是很好的重新启动Apache,所以我重新启动它,但它不重新启动。 然后我禁用了webmail虚拟主机,一切正常! 这是我的主要网站的原始虚拟主机文件, <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.mydomain.com ServerAlias mydomain.com www.mydomain.com DirectoryIndex index.html, index.php DocumentRoot /sites/bswapit LogLevel warn ErrorLog /sites/bswapit/log/error.log CustomLog /sites/bswapit/log/access.log combined <Directory /> Options FollowSymLinks AllowOverride ALL </Directory> <Directory /sites/bswapit/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> AccessFileName .htaccess ScriptAlias /cgi-bin/ […]

mod_pagespeed拥有js和css渲染阻塞

我的mod_pagespeed给出了一个较低的分数,因为它是自己的js和css呈现阻止。 鉴于该工具的devise是为了加速,而不是减速,我不认为这是devise所需的行为。 有没有人遇到过这个? 以下是Google PagSpeed Insights的build议: Remove render-blocking JavaScript: http://pacifika.ru/…_pagespeed_static/js_defer.IRaJtkfeqL.js 和 Optimize CSS Delivery of the following: http://pacifika.ru/…d626d8e8.css.pagespeed.cf.Kr0UOart5j.css http://fonts.googleapis.com/css?family=Bitter&subset=latin 在这里你可以看到完整的照片Pagespeed 我在使用Varnishcaching的Apache服务器上,这里是我启用的mod_pagespeed规则: ModPagespeedEnableFilters extend_cache,combine_javascript,local_storage_cache,rewrite_images ModPagespeedEnableFilters rewrite_javascript,rewrite_css,sprite_images,rewrite_style_attributes ModPagespeedEnableFilters collapse_whitespace,elide_attributes,remove_comments ModPagespeedEnableFilters outline_css,move_css_above_scripts,move_css_to_head ModPagespeedEnableFilters make_google_analytics_async,inline_google_font_css ModPagespeedEnableFilters defer_javascript,prioritize_critical_css 我知道inline_google_font_css不起作用的事实,因为它仍然阻止渲染。

了解Apache服务器状态页面

以下是从Apache网站获取的示例服务器状态页面: Current Time: Thursday, 01-May-2014 07:38:59 UTC Restart Time: Friday, 11-Apr-2014 18:30:33 UTC Parent Server Config. Generation: 27 Parent Server MPM Generation: 26 Server uptime: 19 days 13 hours 8 minutes 26 seconds Server load: 4.90 5.10 5.39 Total accesses: 200912024 – Total Traffic: 24965.1 GB CPU Usage: u5133.55 s2390.16 cu0 cs0 – .445% CPU […]

Apache FastCGI服务器连接失败

我有一个Debian喘息的虚拟机基础框,我一直使用vagrant过去几个月没有任何问题,但昨天当我提出了一个新的机器和更新/升级包我开始得到一个FastCGI服务器连接失败错误: [Wed Jun 04 14:39:03 2014] [error] [client 10.0.2.2] (13)Permission denied: FastCGI: failed to connect to server "/vagrant/php5-fcgi": connect() failed [Wed Jun 04 14:39:03 2014] [error] [client 10.0.2.2] FastCGI: incomplete headers (0 bytes) received from server "/vagrant/php5-fcgi" 我能够通过手动触摸和chmodding /tmp/php5-fpm-vagrant.sock临时解决问题,但是我的问题是为什么它突然间开始发生? 撇开个人喜好,有没有什么function上与我的configuration错? 在我的Apache网站可用我有一个名为000php文件包含: FastCgiExternalServer /vagrant/php5-fcgi -socket /tmp/php5-fpm-vagrant.sock -pass-header Authorization 由于Apache按字母顺序加载站点,所以总是先加载,然后我有另一个名为vagrant文件,其中包含: <VirtualHost *:80 *:8080> DocumentRoot /vagrant/public_html/ ServerName vagrant.localhost […]

在脚本中检测apache2根目录是/ var / www还是/ var / www / html

Apache2最近将默认根目录从/ var / www更改为/ var / www / html,这打破了我为了安装我编写的一些软件而分发的脚本。 有一个可靠的方法来检测脚本,它是? 我更喜欢一个可以在Linux,BSD和MacOS上运行的合理的便携式解决scheme。 我想我可以检查的HTML子目录的存在,但这似乎不是很防弹。 我也想到了这个: source /etc/apache2/envvars ; apache2 -S 这产生了实际上似乎错误的输出: Main DocumentRoot: "/var/www" 实际上,这台机器上的根目录是/ var / www / html。

禁用反向代理的authentication摘要

我已经在我的一个域上设置了auth设置,但我想禁用它作为反向代理。 <VirtualHost *:80> ServerName example.org DocumentRoot /var/www/ <Directory /var/www/> BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On AuthType Digest AuthName "Internal" AuthDigestDomain http://example.org/ AuthDigestProvider file AuthUserFile /etc/apache2/example.digest Require valid-user Options FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ExpiresActive On ExpiresDefault "access plus 7 days" ProxyRequests Off ProxyPreserveHost On ProxyPass /api/ http://api.otherdomain.com/ retry=0 nocanon ProxyPassReverse /api/ http://api.otherdomain.com/ AllowEncodedSlashes […]