Articles of apache 2.2

Apache2 :: AuthenNTLM连接到域控制器,但不进行身份validation

我有一个运行Apache2 :: AuthenNTLM的Apache 2.2服务器。 我已经成功地将Apache2 :: AuthenNTLMconfiguration到它连接到域控制器的地步。 但是,有效的用户名/密码组合会在日志中显示“错误的用户/密码”,并且不会进行身份validation。 这是Apache的configuration: PerlAuthenHandler Apache2::AuthenNTLM AuthType ntlm AuthName "NTLM TEST" Require valid-user # DOMAIN has is the domain users authenticate to, DOMAIN\username # subdomain points to the domain controller. subdomain.domain.local. # /etc/hosts maps subdomain to the correct IP. PerlAddVar ntdomain "DOMAIN subdomain" PerlSetVar ntlmdebug 1 PerlSetVar defaultdomain DOMAIN PerlSetVar […]

如何用PHP-FPM和Apache的mod_fastcgi修复SCRIPT_NAME?

我在我的Apache conf中获得了以下内容来获得PHP-FPM的工作方式: FastCgiExternalServer /srv/www/fast-cgi-fake-handler -host 127.0.0.1:9000 AddHandler php-fastcgi .php AddType text/html .php Action php-fastcgi /var/www/cgi-bin Alias /var/www/cgi-bin /srv/www/fast-cgi-fake-handler DirectoryIndex index.php 这工作正常,但SCRIPT_NAME始终是/var/www/cgi-bin和一些脚本使用SCRIPT_NAME来计算当前脚本(vBulletin)的位置。 Google为Nginx提供了大量的解决scheme,但对于Apache来说并不是一句话。

Apache日志configuration

如何禁用本地主机请求的Apache访问日志? 或为特定的IP?

macros,模板,函数或类似的Apache的conf文件

在刚刚解决的另一个问题之后,我想知道:在Apache中我们可以做些什么来避免重复configuration行? 外面的apache呢? 在我的情况下,这将是AWS EC2的RHEL4,但我相信任何** nix *都会有类似的解决scheme。 也许像sed ,也许使用.htaccess …不知道。 但是,这应该是预处理的,在运行时什么也不做:就像conf文件一样,加载apache就是这样。 在这里,我将复制我以前的解决scheme来说明: UseCanonicalNames off NameVirtualHost *:8888 <VirtualHost *:8888> ServerName example1.com ServerAlias *.example1.com # below, stuff that will be repeated # redirect to HTTPS RewriteEngine on RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^login\.(.*)$ RewriteRule ^(.*) https://%1/login$1 [L] RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^www\.([^.]+\.com)$ RewriteRule ^/login(.*) https://%1/login$1 [L] </VirtualHost> […]

阻止攻击者的IP:我有什么select?

我的一个网站正在遭到一些IP的攻击。 我甚至不知道它是不是ddos,我只知道它填写我的应用程序的日志超过一天,然后服务器崩溃,由于mysql的内存使用情况我猜(我收到一个webmin的自动电子邮件说mysql掉了) 我可以访问Iptables,但是我不确定是否希望它被填充阻塞的ips。 我只是想知道这种情况下最常见的做法是什么,我对服务器pipe理相对来说比较陌生。 我正在使用Linux Centos,Apache,Php和MySQL

Apache:重写规则以更改文件path

我需要改变一个JPGpath来指向一个网站中的不同图片。 这必须通过apache conf完成,因为网站总是用git更新。 关键是要帮助开发人员轻松地看到他们正在开发哪个开发环境,所以如果我可以改写主标识到他们家里的其他东西的path,这将是完美的。 我试图在VirtualHostconfiguration中添加这个:RewriteRule ^ / img / logo.jpg /home/someUser/logo2.jpg

在Red Hat 7上更新Apache,PHP

我有一个运行Red Hat 7的古老的服务器。我想更新httpd的设置,显然红帽不会为这个旧的系统提供更新。 在这台机器上更新这些服务的最佳方法是什么?

将www.domain.com/admin指向除/ admin以外的其他目录

代码按以下目录结构进行组织: /frontend/ index.php … /backend/ index.php … 请注意, /frontend和/backend处于相同的级别。 我build立了一个虚拟主机,使www.domain.com指向/frontend/index.php 。 是否有可能使www.domain.com/admin指向/backend/index.php ,而不设置另一个虚拟主机(例如, admin.domain.com )?

Ubuntu 11.04中的apache + PHP给了我500

我安装了Ubuntu 11.04,然后安装了apache2和php5。 问题是,它甚至给我500 phpinfo(); 脚本。 顺便说一句,CLI版本工作正常。 什么可能是错的? 还有一个问题:如何在init.d脚本的debugging模式下运行apache,或者使用正确的环境variables运行它? UPD :在errors.log中写道: [Mon May 30 23:41:40 2011] [alert] [client 127.0.0.1] /www/phpmyadmin/.htaccess:无效的命令'RewriteEngine',可能是拼错或由未包含在服务器configuration中的模块定义 .htaccess的内容是这样的: RewriteEngine on # Allow only GET and POST verbs RewriteCond %{REQUEST_METHOD} !^(GET|POST)$ [NC,OR] # Ban Typical Vulnerability Scanners and others # Kick out Script Kiddies RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^.*(libwww-perl|curl|wget|python|nikto|wkito|pikto|scan|acunetix).* [NC,OR] RewriteCond %{HTTP_USER_AGENT} […]

login后立即断开SSH连接

我正在改变我的dedi框上的一些设置来添加更多的描述符,然后重新启动。 从那以后,我无法用root的细节(或其他任何人)loginSSH。 只要我login,腻子屏幕closures。 当我从我的其他VPS ssh [email protected] ,它login然后说连接closures。 我现在真的坚持了,因为我已经失去了我的服务器的shell访问,只有plesk .. 编辑:从ssh -v详细输出 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to domain [IP] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/id_rsa type -1 debug1: identity file /root/.ssh/id_dsa type 2 debug1: loaded 3 […]