Articles of apache 2.2

如何避免错误403 Forbidden:Apache虚拟主机configuration问题

我是Apache服务器的新手(2.0,我知道它有点太旧,但是我的工作场所要求我学习它,因为它是我们正在使用的版本),现在试图使Apache与Jboss(Jboss应用程序服务器,Apache面向JBoss并提供所有静态内容)。 我已经通过mod_jk与Apache的Jboss合作; 然而,当我试图添加虚拟主机configuration来让Apache从特定文件夹提供图像而不是推动JBoss提供静态内容时,我得到了403 Forbidden错误。 我经历了几个论坛和其他网站挖掘出一个答案或解决这个问题,可悲的是没有什么似乎为我工作! 🙁 请任何人都可以帮助我呢? 一点点的解释将是一个欢迎添加。 以下是我在httpd.conf文件中的虚拟主机定义。 <VirtualHost *:80> ServerAdmin admin@localhost ServerName localhost DocumentRoot "D:/Dev-Ops/apache/Apache2/htdocs/jboss/" <Directory "D:/Dev-Ops/apache/Apache2/htdocs/jboss/"> AllowOverride All Order Allow,Deny Allow from all Require all granted </Directory> #rewrite incoming requests RewriteEngine On RewriteCond /SchoolApp%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ http://localhost:8080/SchoolApp/$1 [proxy,last] </VirtualHost> 您的帮助将不胜感激。 PS:我在尝试其他几个这样的指示后,正在关注这个链接 。

在Apache2的PHP上使用多个数据库上的pconnect

我在apache2服务器上预先运行PHP(MOD_PHP)。 该设置在Linux Ubuntu 10.04上。 我使用的数据库是一个火鸟数据库2.5.2。 apache2服务器运行在由8个Web服务器组成的Web群集中。 在某个时间点,由于对应用程序的请求(我们有偷看时间)的高峰,我们遇到了严重的性能问题。 显示的瓶颈是需要解决很短时间内发出的请求数量的数据库连接数量。 火鸟并没有很好地处理这个问题,只是要求超时。 这种types的数据库没有连接池,这就是为什么我一直使用PHP中的pconnect来缓解数据库中的压力。 这会在apache2进程中保持数据库连接。 这是一个主要的性能提升。 不利的一面是,我们不得不让apache2进程在被轮换之前需要很多请求,并且即使没有负载,我们仍然运行很多apache2进程。 Web服务器每个运行70个Apache进程。 这是为了保持连接的开放和准备。 基本上我们试图让apache2成为我们的连接池。 这工作。 当用户请求应用程序时,数据库句柄已准备就绪,Firebird不必担心创build新数据库连接的成本。 这是我的问题。 我们现在需要有很多数据库 – 小数据库。 但是他们都将在apache2服务器集群中运行。 这意味着,在apache2进程的生命周期中,它很可能与多个数据库(可能是80-100)保持连接。 我关心apache2如何处理这种情况。 apache2中有多less个连接可以处理? 它会变慢吗?只会在记忆中增长,处理一切完美? 现在对数据库分片没有任何关系。 我们(作为开发团队)完全不喜欢分解数据库的想法。 但是,重写应用程序并没有绿灯,并创build一个新的数据库结构,以获得更多的代码性能。 硬件,现在是答案。 还有一些法律问题迫使我们分成几个数据库来封装数据。 但是这是我有点担心apache2能够处理。 有人知道吗?

在尝试login时,需要apache 2 vhost上的ldap-group失败

我有一个虚拟主机,我正在尝试使用LDAP身份validation。 我的configuration如下所示: <VirtualHost 0.0.0.0:80> DocumentRoot "/var/www/root/" ServerName myServerName ServerAlias http://myServerName.com/ LogLevel debug ErrorLog "/var/log/apache2/svn_error_log" CustomLog "/var/log/apache2/svn_access_log" common <Directory "/var/www/root/"> Allow from all DirectoryIndex index.php </Directory> <Location "/"> AuthType Basic AuthBasicProvider ldap AuthzLDAPAuthoritative off AuthName "Auth" AuthLDAPURL "myLDAPURL" AuthLDAPBindDN "myLDAPBindDN" AuthLDAPBindPassword my-safe-password Require ldap-group OU=Users,OU=A,DC=B,DC=C,DC=D </Location> </VirtualHost> 当我尝试login时,它会拒绝我的身份validation并在日志中声明: auth_ldap authenticate: using URL myLDAPURL auth_ldap authenticate: accepting […]

PHP-FPM设置和mpm_worker(Apache)之间的关系

我有一个网站运行Magento在以下设置: Apache 2.4与mpm_worker PHP-FPM 服务器内存总量:14GB(10GB可用于Apache / PHP) 每个PHP-FPM进程消耗大约80MB的RAM。 我想微调PHP-FPM和mpm_worker的设置。 阅读文档我对PHP-FPM和mpm_worker中的选项之间的关系感到困惑。 例如,PHP-FPM具有configuration: pm.min_spare_servers , pm.max_spare_servers , pm.start_servers和max_children 。 我明白这些选项对于PHP-FPM意味着什么。 但是,mpm_worker具有以下configuration: MinSpareThreads , MaxSpareThreads , StartServers和ThreadLimit 。 再次,孤立到mpm_worker我明白他们做什么。 我的问题是:这些configuration如何相互关联? 比方说,我设置StartServers=2和ThreadsPerChild=25 。 这会给我50个线程开始与Apache / mpm_worker。 如果我然后设置pm.start_servers = 50 ,PHP-FPM最初会产生50个进程。 那么这50个“Apache”线程和50个“PHP-FPM”进程之间的关系是什么? 每个Apache线程是否都使用一个PHP-FPM进程? 我希望有人能够对此有所洞察。 谢谢!

Graphite SQLite3 DatabaseError:数据库被locking

在通过stock graphite-web rpm使用Apache mod_wsgi进行初始安装并在CentOS 6.4上设置Graphite时,出现以下“ DatabaseError:database is locked ”消息: mod_wsgi (pid=9009): Target WSGI script '/usr/share/graphite/graphite-web.wsgi' cannot be loaded as Python module. mod_wsgi (pid=9009): Exception occurred processing WSGI script '/usr/share/graphite/graphite-web.wsgi'. Traceback (most recent call last): File "/usr/share/graphite/graphite-web.wsgi", line 16, in <module> import graphite.metrics.search File "/usr/lib/python2.6/site-packages/graphite/metrics/search.py", line 6, in <module> from graphite.storage import is_pattern, match_entries File "/usr/lib/python2.6/site-packages/graphite/storage.py", […]

Mod Security ctl:ruleEngine =closures白阶段失败阶段1

自定义规则mod_security和单独的.conf文件中的白名单 – Apache 2.2,modsec 2.8 白名单规则: SecRule REMOTE_ADDR "^10\.10\.10\.10" phase:1,nolog,allow,ctl:ruleEngine=Off,id:104008 如果一个请求被发送到包含例如/? /?abc=../../的服务器,则modsec只允许来自10.10.10.10的请求,否则它会拒绝第二阶段的请求,正如我预期的那样(由于我们安装的规则) 我有一位使用远程WorPresspipe理系统的客户(此处以10.10.10.10表示),但该系统发送某些包含Content-Length标题但缺lessContent-Type标题的POST请求。 即使请求来自10.10.10.10,也会导致: –7ed45f75-H– Message: Access denied with connection close (phase 1). Match of "rx ^0$" against "REQUEST_HEADERS:Content-Length" required. [file "/usr/local/apache/conf/modsec_rules/10_asl_rules.conf"] [line "93"] [id "392301"] [rev "7"] [msg "Atomicorp.com WAF Rules: Request Containing Content, but Missing Content-Type header"] [severity "NOTICE"] [tag "no_ar"] Apache-Error: [file […]

基于Apache反向代理位置的访问控制不起作用

我正在用Ubuntu 12.05.5 LTS和Apache 2.2.22运行一个小型Web服务器,最近遇到这个问题: 对于虚拟机上的IIS服务器,我有以下反向代理configuration: <VirtualHost *:443> SSLEngine on DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.1 allow from 192.168. allow from 10.8.0 </Directory> … ProxyRequests Off ProxyPreserveHost On ProxyVia On SSLProxyEngine on <Location /AutodeskDM> Order Deny,Allow Deny from all Allow from 192.168. ProxyPass https://10.8.0.131/AutodeskDM ProxyPassReverse https://10.8.0.131/AutodeskDM […]

PHP-FPM错误:无法读取孩子说:错误的文件描述符(9)

我有这个问题: Apache 2.2.26 PHP 5.4.32 PHP-FPM 5.4.32 Zend OpCache 7.0.3 PHP-FPMconfiguration: [testuser] listen = /dev/shm/testuser-php.sock listen.owner = testuser listen.group = apache listen.mode = 0660 user = testuser group = testuser catch_workers_output = yes pm = ondemand pm.max_children = 64 pm.max_requests = 10000 pm.process_idle_timeout = 20s php_admin_value[error_log] = /home/testuser/var/php-fpm/error.log php_value[memory_limit] = "1024M" 〜mod_fastcgi.conf: <IfModule mod_fastcgi.c> FastCGIExternalServer […]

反向代理上的mod_ssl客户端证书

我正在尝试在代理Oracle应用程序的反向代理上添加客户端证书身份validation。 在添加之前,如果我删除后续代码,oracle应用程序能够启动java,加载并正常工作。 当我在整个代理(因为它只是代理这个应用程序)或特定的位置添加检查时,java应用程序不会加载。 这些是附加的行: SSLVerifyClient需求 SSLVerifyDepth 1 SSLOptions + FakeBasicAuth validation工作正常,漂亮; 只是添加检查停止加载应用程序,不知道为什么。 任何帮助都是极好的 新信息: 我能够解决我的问题与握手失败(这是一个拼写错误,我没有注意到,所以检查失败)。 现在我遇到了: java.lang.ClassNotFoundException:oracle.forms.webutil.common.RegisterWebUtil 在sun.plugin2.applet.Applet2ClassLoader.findClass(未知来源) 在sun.plugin2.applet.Plugin2ClassLoader.loadClass0(未知来源) 在sun.plugin2.applet.Plugin2ClassLoader.loadClass(未知源) 在sun.plugin2.applet.Plugin2ClassLoader.loadClass(未知源) 在java.lang.ClassLoader.loadClass(Unknown Source) 在sun.plugin2.applet.Plugin2ClassLoader.loadCode(未知来源) 在sun.plugin2.applet.Plugin2Manager.initAppletAdapter(未知来源) 在sun.plugin2.applet.Plugin2Manager $ AppletExecutionRunnable.run(未知来源) 在java.lang.Thread.run(Unknown Source) 基本的:load:oracle.forms.webutil.common.RegisterWebUtil找不到。 java.lang.ClassNotFoundException:oracle.forms.webutil.common.RegisterWebUtil 在sun.plugin2.applet.Applet2ClassLoader.findClass(未知来源) 在sun.plugin2.applet.Plugin2ClassLoader.loadClass0(未知来源) 在sun.plugin2.applet.Plugin2ClassLoader.loadClass(未知源) 在sun.plugin2.applet.Plugin2ClassLoader.loadClass(未知源) 在java.lang.ClassLoader.loadClass(Unknown Source) 在sun.plugin2.applet.Plugin2ClassLoader.loadCode(未知来源) 在sun.plugin2.applet.Plugin2Manager.initAppletAdapter(未知来源) 在sun.plugin2.applet.Plugin2Manager $ AppletExecutionRunnable.run(未知来源) 在java.lang.Thread.run(Unknown Source) 如果我删除在post中提到的代码片段,特别是SSLVerifyClient没有或可选,一切都工作。 我也不能将config = webutil添加到我正在使用的链接的末尾,因为它已经指定了一个configuration。

OlegDB在生产

在评估可用的NoSQL解决scheme时,我们的团队确定了以下产品进行评估: OlegDB 。 网站看起来相当不错,文档是可用的。 虽然网站说这是生产就绪( 这里 ),我想知道社区的意见,然后再试一试。 我计划从低端服务器(运行Athlon 5600+,4GB DIMM2的Debian Jessie)开始testing部署,通过我们的Apache HTTPD 2.4为大约10-15个用户同时在线提供数据。 你会说什么呢,值得去testing一下吗? 谢谢!