Articles of apache 2.2

httpd不是以F17上的systemd开头的

标题说明了一切。 这是一个运行在Xenpipe理程序上的新鲜Fedora 17系统。 不知道为什么它不会开始 [root@box~] uname -a Linux box.localhost 3.5.4-2.fc17.i686.PAE #1 SMP Wed Sep 26 22:10:23 UTC 2012 i686 i686 i386 GNU/Linux [root@box~] cat /etc/redhat-release Fedora release 17 (Beefy Miracle) [root@box~] systemctl enable httpd.service ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' [root@box~] systemctl start httpd.service Job failed. See system journal and 'systemctl status' for details. [root@box~] systemctl status […]

网页未知的最后修改date

我想检查网页中文档的年龄,但不显示! 这里是telnet到服务器的结果: telnet av.hostoi.com 80 Connected to av.hostoi.com. HEAD / HTTP/1.0 HTTP/1.1 200 OK Date: Tue, 23 Oct 2012 16:55:40 GMT Server: Apache X-Powered-By: PHP/5.2.17 Connection: close Content-Type: text/html Connection closed by foreign host. 在另一台服务器上,还包括以下两行: Last-Modified: Fri, 17 Jun 2011 11:17:45 GMT ETag: "2ce392-b1-4a5e688eae840" 所以我search了互联网,据我所知,应该有一个configuration在Apache中设置标题和etag在htaccess? 但是我找不到任何可以certificate这一点的地方。 这里是在Apache的加载模块,如果它会帮助: mod_authn_file模块核心mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include负责mod_filter mod_log_config […]

apache2 mysqlauthentication模块和SHA1encryption

我发现自己在一个设置,我需要启用一些身份validation方法使用MySQL。 我已经有一个用户scheme。 该用户scheme像MD5密码和CRYPT魅力一样工作,但当我转向SHA1sum它说: [Fri Oct 26 00:03:20 2012] [error] Unsupported encryption type: Sha1sum 没有有用的日志文件debugging信息。 这是我的设置和一些信息: debian6 apache和ssl安装软件包: root@sistemichiocciola:/etc/apache2/mods-available# dpkg –list | grep apache ii apache2 2.2.16-6+squeeze8 Apache HTTP Server metapackage ii apache2-mpm-prefork 2.2.16-6+squeeze8 Apache HTTP Server – traditional non-threaded model ii apache2-utils 2.2.16-6+squeeze8 utility programs for webservers ii apache2.2-bin 2.2.16-6+squeeze8 Apache HTTP Server common binary […]

fail2ban-apache不阻止IP

我试图configurationfail2ban,我试图login到我的web服务器无数次触发规则,看看我的iptables它似乎已经工作: Chain fail2ban-apache (1 references) target prot opt source destination DROP all — 192.168.1.70 0.0.0.0/0 RETURN all — 0.0.0.0/0 0.0.0.0/0 但是,如果我尝试从.70访问Apache服务器,我仍然可以! 有任何想法吗? 完整列表按要求: Chain INPUT (policy ACCEPT 100998 packets, 137858737 bytes) pkts bytes target prot opt in out source destination 0 0 fail2ban-apache tcp — * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443 1925 322694 fail2ban-ssh […]

我如何禁用Web服务器上的PHP的安全模式?

我正在使用wkhtmltopdf制作一个页面的pdf。 我的代码执行shell来运行使用这个wkhtmltopdf库的命令。 一切工作正常,我的wamp服务器,但是当代码运行在我的networking服务器上,它不起作用,并提供以下错误: Warning: shell_exec() has been disabled for security reasons in /home/pssptech/public_html/…/cert.php on line 272 我认为php是在服务器上以安全模式运行,这就是为什么shell执行被禁用。 但主要的问题是我无法find我的远程networking服务器上的php.ini文件。 你能告诉我在哪里可以findconfiguration文件,以便我可以禁用安全模式? 提前致谢。

Apache2 – 在不同端口的同一个域中托pipe两个站点

我正在托pipe一个临时站点(test.mydomain.com),目前在两个站点(test.mydomain.com和test.FRmydomain.com)的端口80上运行良好。 我正在研究一个新的后端,我想在这个服务器上部署第三个站点进行testing。 我希望它会住在test.mydomain.com:4204。 我有一些Apache的经验,并迅速添加语句: 听4204 NameVirtualHost *:4204 并为我的网站创build了一个新的configuration。 我想象的是我的configuration的相关部分: <VirtualHost *:4204 > ServerAdmin [email protected] ServerName test.mydomain.com:4204 但是,该网站是不公开的,通过名称或IP。 如果我 curl localhost:4204 从服务器,我得到预期的页面内容 在这一点上,如何前进,我有点不知所措。 这似乎是我的configuration是正确的,但无法提供服务。 我最好定义一个代理定义,例如: test.mydomain.com/4204 代理到我的本地主机服务器还是有办法使网站可通过互联网? 编辑: 在使用命令进一步Googlesearch之后,我添加了一个iptable规则: iptables -I INPUT -p tcp –dport 4204 -j ACCEPT 我可以看到apache在4204监听,规则是肯定的,但无法到达网站

在到达WSGI之前,Apache2返回404代理请求

我有一个在Apache2和mod_wsgi下运行的Django应用程序,不幸的是,很多请求试图使用服务器作为代理。 服务器正在响应确定404错误,但错误是由Django(WSGI)应用程序,这会导致高CPU使用率生成。 如果closures应用程序并让Apache直接处理响应(发送一个404),则CPU使用率将下降到接近0(mod_proxy未启用)。 有没有一种方法可以configurationApache,在请求遇到WSGI应用程序之前,直接响应这种请求并发生错误? 我已经看到,也许mod_security将是一个选项,但我想知道如果我没有它可以做到这一点。 编辑。 我会多解释一下。 在日志中,我尝试使用服务器作为Web代理(例如GET http://zzz.zzz/ HTTP / 1.1,其中zzz.zzz是外部域,而不是我的连接)的连接。 这个请求被传递到mod_wsgi然后返回一个404(根据我的Django应用程序)。 如果我禁用应用程序,因为mod_proxy被禁用,Apache直接返回错误。 我最终想要做的就是阻止Apache将请求传递给无效域的WSGI,也就是说,如果请求是代理请求,则直接返回错误而不执行WSGI应用程序。 EDIT2。 这里是apache2configuration,使用站点启用VirtualHosts文件(我已经删除电子邮件地址和更改IP为xxx,将服务器别名更改为sample.sample.xxx)。 我希望Apache能够拒绝任何不带sample.sample.xxx的错误请求,也就是说,只接受对服务器的相对请求,或者只对实际的ServerAlias进行完全限定。 默认: <VirtualHost *:80> ServerAdmin [email protected] ServerName XXXX ServerAlias XXXX DocumentRoot /var/www/default <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options FollowSymLinks AllowOverride None Order allow,deny allow from all </Directory> ErrorDocument 404 "404" ErrorDocument 403 "403" ErrorDocument […]

apache2虚拟主机攻击

我有一个apache2虚拟主机configuration,但我遭受了成千上万的攻击或请求像“POST http://check2.zennolab.com/proxy.php HTTP / 1.1”200 115“GET http://hartford.craigslist.org/ fuo / 3293382678.html HTTP / 1.1“200 2223 有人知道这是什么样的攻击? 我怎么做,以防止? 编辑: 警告 在保证服务器安全之前,请勿使用ProxyRequests启用代理。 开放代理服务器对您的networking和整个Internet都是危险的。 当然它已经启用

Apache:在限制的位置取消限制文件

假设Apache在<Files> <Location>指令之后应用了<Location>指令,那么如何将一个“require all granted”应用于位置中的单个文件? 在下面的例子中,我想RSS的饲料是公开的,而其他一切都是有限的… 或者将这个改为一个<Directory>呢? 例: <Location "/doku"> Options FollowSymLinks Order deny,allow Allow from all AuthBasicProvider ldap AuthLDAPURL ——– AuthLDAPBindDN ——– AuthLDAPBindPassword ——- AuthType Basic AuthName "test" Require ldap-user user </Location> <Files "/doku/feed.php"> Allow from all require all granted </Files>

麻烦与Apache和虚拟主机

我有一个大问题。 我有VPS的Debian操作系统,并安装了LAMP。 新鲜安装。 对于使用Webmin的控制面板。 现在我试图在我的服务器上使用webmin设置多个子域,例如: downloads.my-domain.com cpanel.my-domains.com forum.my-domains.com 但问题是接下来发生的事情,而我没有使用虚拟主机,当我使用my-domain.com访问它时,一切正常,但是当我添加虚拟主机,我不能访问它,但my-domain.com变得不可靠,因为它redirect到我添加的虚拟主机。 当我添加2个以上的虚拟主机时,问题仍然存在。 此外,当我尝试访问虚拟服务器,例如downloads.my-domain.com,它再次redirect到cpanel.my-domains.com当我删除虚拟主机,访问my-domain.com是succesfull … 我所知道的: – That is not problem with my domain provider. I correctly added subdomains and added host record to my VPS IP. – I added unique name to every single virtual host. – There are no two same virtual hosts – Every virtaul […]