Articles of apache 2.2

错误信息,当试图启动centos 5.5上的清漆

我只是安装并configurationVarnish在端口80上工作,而Apache在端口8080上工作。我试图用命令service varnish start来启动Varnish,但它给了我这个错误: varnishd死了但pid文件存在 我在/etc/sysconfig/varnish编辑了这个configuration: DAEMON_OPTS="-a :80 \ -T localhost:6082 \ -f /etc/varnish/default.vcl \ -u varnish -g varnish \ -S /etc/varnish/secret \ -s file,/var/lib/varnish/varnish_storage.bin,1G" 这是default.vcl文件的内容: backend default { .host = "127.0.0.1"; .port = "8080"; .connect_timeout = 600s; .first_byte_timeout = 600s; .between_bytes_timeout = 600s; } sub vcl_recv { if (req.request != "GET" && req.request != "HEAD" […]

在Apache中,来自单个IP地址的ESTABLISHED连接过多

netstat -ntp |grep 80显示来自单个IP地址的ESTABLISHED连接太多。 其中约300人,这不是一个攻击 ,用户使用2G连接访问Apache。 其他2G连接也是如此。 由于这个Apache正在耗尽儿童。 早些时候,它显示了太多的close_wait并且在启用tcp_tw_reuse和tcp_tw-recycle之后,没有太多的close_wait但是增加了ESTABLISHED连接的数量。 我们使用的是具有48 GB RAM的Ubuntu 11.04 keepalive On keepalive timeout 10 max clients 800 max-request-perchild 4000 timeout 300 我已经将syn_ack设置为1, syn_retries为2。 在WiFi上没有这样的问题。 连接正常closures,但使用2G连接,Apache正在耗尽儿童和许多ESTABLISHED连接。 我也尝试了从默认300到30设置超时 ,但由于我们的项目是手机图像托pipe,客户端无法正确上传图像,因为他们正在越来越频繁的时间。此外还有大量的408消息,所以改变它默认300

Dropbox为什么会在Ubuntu上导致apache2虚拟主机path的path+权限问题?

我正在试图在我的64位12.04 Ubuntu机器上创build一个开发环境,而且我正在最糟糕的时候让虚拟主机工作。 我终于明白了问题所在,但是我真的不明白。 我将我的虚拟主机的文档根目录设置在我的主目录中,即: /家庭/罗伯特/ Dropbox的/ WWW / personville 当我在浏览器中访问www.personvillepress2.com时,我得到了 禁止您无权访问/在此服务器上。 Apache / 2.2.22(Ubuntu)服务器在www.personvillepress2.com端口80 在日志中,我明白了 [星期六六月十六日09:55:25] [暴击] [客户端127.0.0.1](13)权限被拒绝:/home/robert/Dropbox/.htaccess pcfg_openfile:无法检查htaccess文件,确保它是可读的 我将文档根目录移到/ home / robert / www / personville 相应地修改虚拟主机设置,重新加载,然后突然一切正常! 这是不好的,因为我想保留我的所有来源在我的Dropbox文件夹进行备份。 我的保pipe箱文件夹的权限似乎很正常: robert@kundera-linux:~/Dropbox$ ls -al total 1036 drwx—— 29 robert robert 4096 Jun 15 09:11 . drwxr-xr-x 60 robert robert 4096 Jun 15 21:15 .. -rw-rw-r– 1 […]

Apache的两个netstat结果之间的区别

我们在运行Apache HTTP Server的两个前端Web服务器上运行RedHat Linux。 我已经做了两个httpd.conf文件的差异,没有什么区别,但服务器的主机名。 我们已经看到一些问题,其中一个服务器正在向第一个Web服务器发出请求时向负载均衡器发送重置。 所以我注意到了一些独特的东西: 当我运行netstat-an | grep 80 | grep LISTEN的结果是不一样的。 第一次显示:0.0.0.0:80 LISTEN(我习惯看到这个,我相信允许服务器上的任何IP通过端口80响应。 第二场演出:::: 80听(我从来没有见过这个) 任何人都可以解释为什么第二个Web服务器看起来不同于第一个? 如果这是一个问题或没有什么大不了的? 谢谢

Apache 403 – 在父级的父目录中查找.htaccess

我有这个问题(apache2,Ubuntu的12.04) 我已经把所有我的网站放在/ home / username / vhosts文件夹中我已经添加了家和用户名的权限是x和虚拟主机上的chmod -r 777增加了/ etc / hosts来访问我的站点和所需的名字a2enmod rewrite 但是我仍然有这个错误: [Sat Jun 23 00:05:23 2012] [crit] [client 127.0.0.1] (13)Permission denied: /home/username/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable 为什么它不可读? 我做了 sudo -s su – www-data 和我可以正确列出/ home /用户名目录 我或者Apache有什么问题?

连接拒绝在SSH隧道到Apache转发代理设置

我正在尝试在小型服务器中设置一个私人转发代理。 我的意思是在会议期间使用它来通过ssh隧道将我的互联网访问隧道到代理服务器。 所以我在apache-2.2内部创build了一个虚拟主机,运行代理,proxy_http和proxy_connect模块。 我使用这个configuration: <VirtualHost localhost:8080> ServerAdmin xxxxxxxxxxxxxxxxxxxx ServerName yyyyyyyyyyyyyyyyyyyy ErrorLog /var/log/apache2/proxy-error_log CustomLog /var/log/apache2/proxy-access_log combined <IfModule mod_proxy.c> ProxyRequests On <Proxy *> # deny access to all IP addresses except localhost Order deny,allow Deny from all Allow from 127.0.0.1 </Proxy> # The following is my preference. Your mileage may vary. ProxyVia Block ## allow SSL proxy […]

请仔细检查我的SSLconfiguration。 可以吗?

我是SSL新手。 我在运行Apache 2.2.3-65的CentOS 5系统上进行设置。 它似乎工作 – 一个可以浏览我的网站和https协议显示在地址栏中。 这是我的SSL虚拟主机configuration。 它看起来好吗? 我有没有犯过重大错误? 目的是为了encryption这个特定站点的所有stream量,所以没有端口80的虚拟主机,只有这个。 <VirtualHost *:443> ServerName www.mydomain.com ServerAlias mydomain.com DocumentRoot "/opt/deployed_rails_apps/my_app/current/public" SSLEngine on SSLCertificateFile /etc/pki/tls/certs/www.mydomain.com.crt SSLCertificateKeyFile /etc/pki/tls/certs/www.mydomain.com.pem SSLCACertificateFile /etc/pki/tls/certs/www.mydomain.com.ca-bundle ErrorLog "logs/mydomain.com-ssl-error_log" CustomLog "logs/mydomain.com-ssl-access_log" common CustomLog "logs/mydomain.com-ssl-deflate_log" deflate <Directory "/opt/deployed_rails_apps/rock_pebble/current/public"> Options -MultiViews FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </Virtualhost>

如何在NGINX中复制我的.htaccessfunction

我在Apache下面的.htaccess文件redirect所有请求到app/index.php有或没有GET参数。 我刚刚安装了NGINX,我的应用程序将无法运行。 任何人都可以协助在NGINX中复制相同的function吗? 谢谢。 RewriteEngine on Options -Indexes RewriteRule ^$ app/ [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ app/index.php?url=$1 [QSA,L]

Apache服务器相对redirect

是否有可能使用现有的Apachefunction实现服务器相对redirect? mod_alias确实有一个redirect命令,但是总是会产生一个绝对的redirect,即使像这样configuration Redirect /asdf /qwer 也尝试使用这样的mod_rewrite : RewriteEngine On RewriteRule /asdf(.*) /qwer$1 [R,L] 这些设置的最终结果是相同的: HTTP/1.0 302 Found Location: http://my-host.blah.blah:20085/qwer 但是我真正需要的是: HTTP/1.0 302 Found Location: /qwer —编辑— 是的,我知道这是违反RFC规范。 但所有现代浏览器都支持相对redirect,我真的需要临时修复。

vhost文件不能被apache识别

嗨,对不起,总是对阿帕奇和苹果在这里…感觉答案是非常明显的,但我一直在寻找年龄没有成功 我在/private/etc/apache2/extra/httpd-vhosts.conf中有以下几行 NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/Library/WebServer/Documents/mfoe/" ServerName mfoe.cycle </VirtualHost> httpd.conf文件包含虚拟主机 # Virtual hosts Include /private/etc/apache2/extra/httpd-vhosts.conf 那么为什么当我在terminal运行命令:$ httpd -S我得到: httpd: Could not reliably determine the server's fully qualified domain name, using Alexs- MacBook-Air.local for ServerName VirtualHost configuration: Syntax OK 看起来好像没有在虚拟主机中读取任何东西。 在重新启动时出现这个错误可能有什么? Alexs-MacBook-Air:/ alex$ httpd -k restart httpd: Could not reliably determine the […]