我使用apt-get软件包pipe理器在我的ubuntu机器上安装了apache2。 它安装了Apache 2.2.16。 我想升级到apache2的最新版本(或者至less是更新的版本),但apt-get升级和更新似乎没有find一个更新的版本。 当我input apt-get install -s apache2 它告诉我 apache2 is already the newest version. 我是否需要手动下载这个软件包? 有没有理由不这样做? 这是我正在运行的Ubuntu版本: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.10 DISTRIB_CODENAME=maverick DISTRIB_DESCRIPTION="Ubuntu 10.10"
我最近在我的服务器*.key和*csr文件中创build了一个SSL证书。 然后我用Comodo创build了*crt和*.ca-bundle 。 我有2个当前的虚拟主机: 虚拟主机 – http://www.example.com NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/home/example/public_html/example.com/httpdocs" ServerName example.com ServerAlias www.example.com </VirtualHost> 虚拟主机https://www.example.com NameVirtualHost *:443 <VirtualHost *:443> SSLEngine on SSLCertificateFile /etc/ssl/certs/example_com.crt SSLCertificateKeyFile /etc/ssl/certs/server.key <Directory /home/example/public_html/example.com/httpdocs> AllowOverride All </Directory> DocumentRoot /home/example/public_html/example.com/httpdocs ServerName example.com </VirtualHost> 问题是,当我去https://www.example.com我得到一个404 我不知道虚拟主机是否正确,或者为什么我得到了404。有没有人见过这个? 我已经启用mod_ssl并重新启动apache 非常感谢
我们使用capistrano进行网站部署,我们的Apache文档根目录是特定代码版本的符号链接。 部署过程将符号链接从旧版本切换到新版本,作为部署的最后一步。 我们正在将我们的Web服务器从运行RHEL 5.6的真实服务器迁移到运行Ubuntu 11.10的Amazon EC2虚拟机,并且新服务器遇到了一个问题:Apache在切换符号链接时没有立即注意到文档根目录的变化。 这可能需要一秒左右( 我想我已经看了几分钟 )。 这有点像Apachecaching了符号链接的物理path一段时间。 有谁知道一些Apache设置,我可以看看它来“扫描”更快的服务文件的变化。 思考: 我读了虚拟机上的磁盘速度慢得多(因为它们是networking连接存储)。 也许文件系统caching不知何故工作呢? 如果是的话,有什么可以做的吗? 该网站运行PHP代码。 也许RHEL和Ubuntu之间有一些PHPconfiguration的区别? 我检查了realpath_cache_ttl但两台服务器都注释掉了: 例如 ; Duration of time, in seconds for which to cache realpath information for a given ; file or directory. For systems with rarely changing files, consider increasing this ; value. ; http://www.php.net/manual/en/ini.core.php#ini.realpath-cache-ttl ;realpath_cache_ttl = 120 我们确实使用APC操作码caching但不认为这是由于实验的问题。 […]
希望有人能指出我正确的方向,因为我已经花了上周的时间来试图找出“问题”在哪里,但一直未能,尝试张贴到Apache用户邮件列表,但要在这里反弹以及。 在CentOS 5.8上运行Apache 2.2.3 mod_php。 与此同时,每天当stream量很大时,我们遇到了一个问题,即Apache不再响应任何HTTP请求。 这听起来像一个标准的MaxClients达成的问题,但似乎并非如此。 另外,在此期间login到机器的平均负载不到1,并且仍然有足够的RAM可用。 回顾/ var / log / httpd / error_log我注意到了以下模式: [Mon Apr 30 07:00:34 2012] [info] server seems busy, (you may need to increaseStartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 905 total children [Mon Apr 30 07:00:35 2012] [info] server seems busy, (you may need […]
我在Apache下编写了一个运行在PHP中的IPP服务器。 与标准的IPP客户端,它工作得很好。 但是,当我尝试从iOS设备打印时,当客户端尝试切换到TLS时,连接中断。 这似乎被RFC 2817(在HTTP / 1.1中升级到TLS)所涵盖,并且应该由Apache支持多年。 我的Apacheconfiguration有什么问题? Apache SSLconfiguration: SSLEngine optional SSLCertificateFile /path/to/server.crt SSLCertificateKeyFile /path/to/server.key 请求: OPTIONS * HTTP/1.1 Connection: Upgrade Host: iserv.local Upgrade: TLS/1.0,SSL/2.0,SSL/3.0 User-Agent: CUPS/1.5.0 回复: HTTP/1.1 200 OK Server: Apache/2.2.16 Content-Length: 0 Content-Type: text/plain 预期回复: HTTP/1.1 101 Switching Protocol Server: CUPS/1.4 Connection: Keep-Alive Keep-Alive: timeout=30 Connection: Upgrade Upgrade: TLS/1.0,HTTP/1.1 Content-Length: 0
WordPress的.htaccess通常有以下重写规则: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> 当我在我的网站上访问一个不存在的URL时,这个重写规则被打到,redirect到index.php ,并提供我自定义的404.php模板文件。 返回给客户端的状态码是正确的404,如下面的HTTP Live Headers输出示例所示: http://www.borngeek.com/nothere/ GET /nothere/ HTTP/1.1 Host: www.borngeek.com {…} HTTP/1.1 404 Not Found 但是,Apache在我的服务器日志中用200个状态代码报告整个交换,如日志代码片段所示(为简单起见而修剪): {…} "GET /nothere/ HTTP/1.1" 200 2155 "-" {…} 这对我来说是有道理的,因为原来的请求被redirect到存在的页面(index.php)。 有没有办法强制Apache将404交换报告? 我的问题是来自坏人的虚假请求在我使用的各种服务器统计软件(AWStats,Analog等)中显示为“成功请求”。 我很乐意让他们在404上出现在404上,这样他们就可以从生成的统计报告中过滤出来。 我尝试添加下面的行到我的.htaccess,但它没有任何效果(我猜和原来的redirect规则相同的原因): ErrorDocument 404 /index.php?error=404 有没有人有一个聪明的方法来解决这个烦恼? […]
我正在configurationApache以针对LDAP进行身份validation,并要求存在多个组。 我已经做了这个要求陈述,但是我需要authentication是成功的,如果所有组在那里,而不只是一个。 我如何告诉Apache经历所有的需求陈述?
我在configuration基于名称的虚拟主机时遇到了一些麻烦。 我可以用一个空白的httpd.conf文件启动“service apache2 start”服务器,并且它将运行在所有指向/ var / www的地方。 当我填写httpd.conf时: # Ensure that Apache listens on port 80 Listen 80 # Listen for virtual host requests on all IP addresses NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /www/kevins_playground ServerName home.coolkev.com # Other directives here </VirtualHost> <VirtualHost *:80> DocumentRoot /www/flatline_and_co ServerName www.flatline_and_co.com # Other directives here </VirtualHost> 运行“service apache2 start”时出现此错误 […]
我最近在我的服务器上设置了Capistrano,而且效果很好。 我改变了我的虚拟主机,指向由Capistrano创build的符号链接。 我的虚拟主机文件: <VirtualHost *:80> DocumentRoot /var/www/html/my_app.com/current ServerName my_app.com <Directory /> Options FollowSymLinks AllowOverride Indexes </Directory> </VirtualHost> 当我重新启动我的Apache服务器使用sudo service httpd restart ,我得到的错误: Warning: DocumentRoot [/var/www/html/my_app.com/current] does not exist current目录肯定存在。 当我设置虚拟主机指向…/my_app.com/ ,它的工作原理和显示默认的apache页面,问题是这个符号链接到current (这是更新为我部署应用程序使用capistrano)。 我使用的是Amazon EC2实例,Apache 2.2(LAMP)。 所以基本上,我如何将一个虚拟主机指向一个符号链接? 更新 ls-l的输出: lrwxrwxrwx 1 ec2-user ec2-user 57 Aug 28 22:40 current -> /var/www/html/my_app.com/releases/20120828223437 drwxrwxr-x 3 ec2-user ec2-user 4096 Aug […]
我有问题与Apache。 一切从一个星期前开始(所以这可能与最新的系统更新有关) – 我的监测工具短信我关于非工作的网站。 我已经检查了它,看起来像请求微不足道的CGI(实施perl)花了30秒。 重新启动apache后,问题在接下来的几个小时/天内被修复,然后再次发生。 最初我怀疑PHP,因为它只是更新(5.3.15-> 5.3.18),可能会影响Apache。 我已经试图把它退回到5.3.15,但是这并不能解决这个问题。 接下来,我做了strace,看起来像是clone()系统调用发生延迟: [pid 26659] 1356268557.675934 clone( <unfinished …> [pid 26659] 1356268587.684401 <… clone resumed> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xa1033768) = 32169 <30.008452> CGI本身运行后,工作正常和快速: [pid 32169] 1356268587.686614 execve("/var/www/mysite.com/mycgi.cgi", ["/var/www/mysite.com/mycgi.cgi"], [/* 26 vars */]) = 0 <0.000776> 任何想法,为什么这可能发生? 克隆(2)如何以及为什么会阻塞30秒? 并成功返回之后…它看起来像克隆()内的一些超时,因为它总是正好30秒。 我正在使用最新的Hardened Gentoo Linux,内核3.5.4-hardened-r1,apache 2.2.23(prefork,mod_cgi)。 更新:我可能应该补充:这个服务器是不是在高负载下。 Apache儿童只使用大约120/40 MB(VIRT / RSS)。 服务器有2GB内存,只有400MB使用(没有缓冲区/caching)。