Articles of httpd

PHP文件没有得到parsing?

可能重复: 问题与PHP和Apache 我在运行Apache 2.2.3的CentOS 5服务器上运行php 5.1.6 当我使用命令php -v它说 PHP 5.1.6(cli)(内置:2010年11月29日16:47:46)Copyright(c)1997-2006 PHP Group Zend Engine v2.1.0,Copyright(c)1998-2006 Zend Technologies 并在var / www / html文件夹上创build一个my_file.php并运行命令 php -f my_file.php我的输出是“Hello World!” 所有fi9直到这里,但是当我通过服务器上的filezilla上传文件,并通过浏览器运行的页面,然后PHP而不是得到parsing只是打印在简单的文本的forms。 我无法在http.conf文件中看到任何PHP5的LoadModule,当我手动添加它并重新启动我的httpd,然后我的PHP文件而不是被执行,它只是得到下载。 可能是任何configuration问题。 任何人都可以帮我解决这个问题吗? 请询问是否有其他信息需要find解决scheme。

日志 – 服务器内核:信息:任务httpd:000000被阻塞超过120秒

几乎每天我的服务器崩溃,由于高服务器负载,甚至重新启动Apache或MySQL不能解决问题。 我需要重新启动服务器来解决,或者由于高负载而再次崩溃。 日志系统在崩溃时logging下这样的内容: Aug 11 18:33:53 server kernel: INFO: task httpd:20008 blocked for more than 120 seconds. Aug 11 18:33:53 server kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Aug 11 18:33:53 server kernel: httpd D ffffffff801538ac 0 20008 5816 20066 19809 (NOTLB) Aug 11 18:33:53 server kernel: ffff81025a299dc8 0000000000000082 ffff81033b4c0740 ffffffff80009a14 Aug 11 18:33:53 […]

许多进程:httpd -k restart -DSSL

我试图更多地了解Apache如何工作。 我用top -c来分析Apache进程。 在我的两台服务器上,我总是有: httpd -k restart -DSSL httpd -k restart -DSSL httpd -k restart -DSSL httpd -k restart -DSSL httpd -k restart -DSSL 从我的理解,这重新启动Apache。 为什么有这么多的进程重新启动Apache。 我所期望的是: httpd -DSSL 有人可以解释这对一个新手pipe理员? 这些网站都运行良好,我还应该担心吗? 谢谢奥利弗

Apache版本升级

系统操作系统:Fedora 13 Web服务器:Apache(已安装) 尝试升级Apache 2.2.17时尝试了以下命令无济于事: yum upgrade yum update yum check-upgrade yum update httpd yum install httpd 所有这些命令尝试后,我不断收到一条消息,说没有任何包/更新可用,并已安装最新版本。 rpm -qa | grep -i httpd shows httpd 2.2.17

Apache2无法closures连接,重新启动

我正在用Apache2运行一个Debiannetworking服务器,重启命令开始给我一个错误。 root@srv:~# service apache2 stop Stopping web server: apache2. root@srv:~# service apache2 start Starting web server: apache2(98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log […]

Nginx重写错误

出于某种原因,www.server-1.com/forum不会redirect到forum.server-1.com,而是www.server-2.com。 当我删除它redirectwww.server-1.com到www.server-2.com的部分,它就像一个魅力…好吧,不完全是,因为论坛后的第一个斜线得到不知何故在这个过程中,每当url并不以/ forum结尾,而是以/forum/index.php为例。 # Redirect www.server-1.com/forum to forum.server-1.com # Redirect www.server-1.com/forum/ to forum.server-1.com # Redirect www.server-1.com/forums to forum.server-1.com # Redirect www.server-1.com/forums/ to forum.server-1.com # Redirect www.server-1.com to www.server-2.com server { listen 80; server_name www.server-1.com; location = /forum { rewrite ^ http://forum.server-1.com redirect; break; } location /forum/ { rewrite ^/forum/(.*) http://forum.server-1.com$1 redirect; break; } location = […]

如何找出为什么一个请求需要很长时间出现在Apache访问日志?

我有一个客户端软件,调用和安装在同一台机器上的Apache HTTP服务器。 在调用apache之前logging日志条目: 2011-11-23 13:27:43,777 | 8323|1381677376 | root | DEBUG | Calling http://mydomain.com/api/project/325/postings/add_and_remove_labels 正如你所看到的,当地时间是13:27:43。 域mydomain.comparsing同一台计算机的外部IP。 但是,当我看access.log文件,我说时间戳记[1]是5秒后的日志条目: [23/Nov/2011:13:27:48 +0100] "GET /api/project/325/postings/add_and_remove_labels 这是一个以守护进程模式运行的mod_wsgi基本服务器,但我不确定它是否相关(如果请求在apache级别,则时间戳应该是开始的)。 我怎样才能最好地找出这5秒的来源? 欢呼声,波阿斯 澄清:[1] – 时间戳是请求开始的时间 。 当请求结束时,条目是写入日志的,但是时间是请求开始的时间。

CPU利用率LAMP堆栈

我们有一个运行Magento的ec2 m2.4xlarge(centos 5.6,httpd 2.2,PHP 5.2.17,eaccelerator 0.9.5.3,mysql 5.1.52)。 现在我们遇到了一个很大的stream量高峰,我们的顶部是这样的: top – 09:41:29 up 31 days, 1:12, 1 user, load average: 120.01, 129.03, 113.23 Tasks: 1190 total, 18 running, 1172 sleeping, 0 stopped, 0 zombie Cpu(s): 97.3%us, 1.8%sy, 0.0%ni, 0.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.4%st Mem: 71687720k total, 36898928k used, 34788792k free, 49692k buffers Swap: 880737784k total, 0k […]

CentOS6 – httpd – mod_file_cache

看来,CentOS 6不再支持几个Apache模块(mod_file_cache,mod_mem_cache和mod_imagemap)根据他们的文档 。 处理这个问题的最好方法是什么? 只要从httpd.conf中删除引用,或手动下载和编译? 我正在考虑只是删除,看看我的代码库是否按预期工作,然后如果有东西坏了,手动编译。 希望我可以安全地从httpd.conf中移除这些模块,一切仍然有效。

无效configuration`noarch-redhat-linux-gnu':机器`noarch-redhat'无法识别

当我尝试从src rpm(Apache 2.4.1)构buildrpm时,出现这个错误: rpmbuild -tb httpd-2.4.1.tar.bz2 –ba httpd.spec + ./configure –build=x86_64-redhat-linux-gnu –host=x86_64-redhat-linux-gnu –target=noarch-redhat-linux-gnu –program-prefix= –prefix=/usr –exec-prefix=/usr –bindir=/usr/bin –sbindir=/usr/sbin –sysconfdir=/etc –datadir=/usr/share –includedir=/usr/include –libdir=/usr/lib64 –libexecdir=/usr/libexec –localstatedir=/var –sharedstatedir=/usr/com –mandir=/usr/share/man –infodir=/usr/share/info –enable-layout=RPM –libdir=/usr/lib64 –sysconfdir=/etc/httpd/conf –includedir=/usr/include/httpd –libexecdir=/usr/lib64/httpd/modules –datadir=/var/www –with-installbuilddir=/usr/lib64/httpd/build –enable-mpms-shared=all –with-apr=/usr –with-apr-util=/usr –enable-suexec –with-suexec –with-suexec-caller=apache –with-suexec-docroot=/var/www –with-suexec-logfile=/var/log/httpd/suexec.log –with-suexec-bin=/usr/sbin/suexec –with-suexec-uidmin=500 –with-suexec-gidmin=100 –enable-pie –with-pcre –enable-mods-shared=all –enable-ssl –with-ssl –enable-socache-dc –enable-bucketeer –enable-case-filter –enable-case-filter-in –disable-imagemap […]