我有个问题。 我使用Legrandin的NTLM身份validation模块PyAuthenNTLM2与我的Apache2服务器。 它真的很好,安装也很简单。 我推荐给大家 身份validation工作得很好。 但是一旦POST请求被发送,我就有问题了。 每次POST发送到服务器,IE的令人讨厌的凭据提示不断出现。 即使我选中了“记住我的凭证”。 这是我现在如何configuration它: <Directory /var/www/> AuthType NTLM AuthName DOMAIN require valid-user PythonAuthenHandler pyntlm PythonOption Domain DOMAIN PythonOption PDC 123.45.67.89 PythonOption BDC 123.45.67.89 Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> 我对你们的问题: 是否可以只在一个URL上进行身份validation? 例如:如果用户首次访问我的页面,则URL将为: http : //domain.com/custom/login 。 虽然这个URL不代表目录。 它只是Zend Framework的一个控制器。 这可能吗?
Th服务器运行着40个WordPress站点。 最初,当服务器有2GB的内存时,使用mod_php和mpm-prefork来设置服务器,并且运行起来很舒服。 然而,最近我更新了服务器以使用FastCGI,suexec和mpm-worker。 从那时起,我无法让Apache免受吞噬所有可用RAM,直到它开始交换,并最终停止响应。 为了缓解这个问题,我们把服务器从2GB提高到了4GB,但是在7个小时之后,服务器占用了所有的4GB,并重新进入了交换。 在mpm-prefork下,我们只设置MaxClients,一切都很好。 但对我来说,在mpm-worker下,我找不到似乎工作的设置。 MaxRequestsPerChild,ThreadsPerChild和MaxClients的任何组合仍然会导致相同的结果。 我以前从来没有和mpm-worker合作过,所以我不确定如何调整。 我已经花费了无数个小时来searchApache2.conf中的设置,并尝试了几十个设置,但是它们都使用了所有内存的同一条path。 使用4GB的服务器,为其他进程留下大约400MB的空间,并且知道每个Apachesubprocess在生成时都运行在50MB左右,那么什么样的设置组合应该可以让服务器尽量避免使用内存? 当前的设置: <IfModule mpm_worker_module> StartServers 6 ServerLimit 25 MinSpareThreads 25 MaxSpareThreads 50 ThreadLimit 75 ThreadsPerChild 25 MaxClients 75 MaxRequestsPerChild 2000
我需要你的帮助。 我有问题反向代理重写为https: 我有一个露天的应用程序运行在tomcat之上,作为一个前端和一个Apache服务器 – 它的网站启用看起来像这样: <VirtualHost *:80> ServerName alfresco JkMount /* ajp13_worker <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature Off </VirtualHost> 我也有一个反向代理服务器在第二台机器上运行,我希望它重写查询到https。 它的网站启用看起来像这样: <VirtualHost 192.168.251.50:80> ServerName alfresco […]
我在下面的代码中导致redirect循环的最后一行的问题(至less这是我的想法) RewriteEngine On RewriteBase /jgel/ RewriteCond %{REMOTE_ADDR} !^172\.172\.121\.142 RewriteCond %{REQUEST_URI} !maintainance\.php RewriteCond %{REQUEST_URI} !resources/(.*)$ [nc] RewriteRule ^(.*)$ maintenance.php [R=307,L] 我已经尝试过,这也是行不通的 RewriteEngine On RewriteBase / RewriteCond %{REMOTE_ADDR} !^172\.172\.121\.142 RewriteCond %{REQUEST_URI} !maintainance\.php RewriteCond %{REQUEST_URI} !resources/(.*)$ [nc] RewriteRule ^(.*)$ /jgel/maintenance.php [R=307,L]
我的系统:CentOS 6.2 64位Apache 2.2.15 PHP 5.3.3我有WordPress 3.3.1。 我的服务器上有几个域configuration为虚拟主机。 网站文件的path如下:/var/www/vhosts/mydomain.com/httpdocs/ logging该域的文件:/var/www/vhosts/mydomain.com/logs/ 所以,今天我在日志目录中发现了一个未知的文件“index.html”。 网站本身工作正常,我看不到核心文件的任何更改。 这个index.html包含以下内容: … <META HTTP-EQUIV="Refresh" Content="0; URL=http://173.255.248.137" … 此urlredirect到vimeo.com上的一些有线中文课程。 所以,任何人都有类似的东西或知道这个文件是如何上传到我的服务器? 任何日志文件,我必须检查? 谢谢你的帮助!!!
是否有可能configurationApache的mod_proxy将503错误视为200,只是直接转发给客户端,而不是显示自己的错误页面?
我们在ubuntu 11.10服务器版上运行mysql 5.1.58,配合48 GB内存和英特尔e5620处理器以及apache 2.2.20。 但是我们正面临着一个问题,即使我已经设置好了,也会阻止Mysql接受更多的连接 max_connections为800 key_buffer转换为4Gb(Myisam作为Innodb的3 tbales的默认引擎)。 key_buffer_size +(read_buffer_size + sort_buffer_size)* max_connections = 5.4Gb 和每个MySQL重新启动后,max_used_connection接近600几个小时,即使没有任何用户。我们已启用查询caching和线程caching。请你帮忙find真正的问题。可以是因为任何configuration错误或由于任何编码错误? 我们也尝试使用默认的mysqlconfiguration,但没有任何改变, 但改变Apache的configuration为默认显示了巨大的差异 ,现在max_used稳定在57而不是595编辑configuration。可以告诉我是什么导致apache采取mysql达到其max_used_connection值在Apache max_clients中是800 , max_spare_servers为200
我遇到了PHP-FPM和Apache 2.4.1 mod_proxy_fcgi的问题。 由于mod_proxy_fcgi无法处理Unix套接字,PHP-FPM必须在本地主机上侦听。 因此,任何有权访问服务器的人都可以向PHP-FPM发送请求。 我无法将PHP-FPM限制到我的文档根目录,所以有人可以创build一个恶意的PHP文件,确保我的PHP进程可以访问它,并发送一个特殊的请求到PHP-FPM侦听的端口。 (我已经尝试了,它的工作。) 我在我的apacheconfiguration中有以下内容: <VirtualHost *:80> ServerName example.org DocumentRoot /srv/vhosts/example.org/vhostdata/public/ <Directory /srv/vhosts/example.org/vhostdata/public/> Require all granted </Directory> <LocationMatch ^(.*\.php)$> ProxyPass fcgi://127.0.0.1:6001/srv/vhosts/example.org/vhostdata/public/ ProxyErrorOverride On </LocationMatch> </VirtualHost> 如何让PHP-FPM在收到的每个请求中都占用文档根目录/srv/vhosts/example.org/vhostdata/public/ ? 我已经玩了chdir指令,但它不适合我的需要。 不幸的是,使用chroot不是我的select,因为我正在linux-vserver环境中运行,其中出于安全原因, mknod已被pipe理员禁用。
首先我的术语可能是错误的,但是当我听到“直接访问”时,我认为有人意味着任何人都已经从url中读取文件的权限。 我对“直接进入”是什么意思的理解是正确的? 我使用htaccess来防止直接访问以下目录(http目录是DocumentRoot /var/www/public_html ) <Directory /var/www/public_html/indirect_access/> AuthType Basic AuthName "Restricted Access" AuthUserFile /passwords/me Require user me </Directory> 我有两个文件 /var/www/public_html/indirect_access/indirect.php <?php echo 'hi'; ?> /var/www/public_html/direct.php <?php include('indirect_access/indirect.php'); ?> 当有人去www.mysite.com/direct.php,浏览器打印“嗨”。 当有人去www.mysite.com/indirect_access/indirect.php他们被提示input用户名和密码。 但是当我改变/var/www/public_html/direct.php的内容来包含一个AJAX请求 $.ajax({ url: "indirect_access/indirect.php", type: "GET", dataType: 'html', success: function(data){ $("body").prepend(data); }, }); 然后我尝试访问www.mysite.com/direct.php,提示input用户名/密码。 是否有可能阻止htpasswd提示通过ajax间接访问文件的身份validation?
要设置Passenger,必须安装一些软件包,例如libcurl4-openssl-dev: user@ubuntu:~$ sudo apt-get install libcurl4-openssl-dev Reading package lists… Done Building dependency tree Reading state information… Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of […]