Articles of apache 2.4

Apache Reverse proxy – ProxyPass在多个位置发生冲突

ProxyPreserveHost打开 <Location /stores/identityiq> ProxyPass https://ncdlxxxasa0002:8443/identityiq ProxyPassReverse https://ncdlxxxasa0002:8443/identityiq </Location> <Location /identityiq> ProxyPass https://ncdlxxxasa0002:8443/identityiq ProxyPassReverse https://ncdlixxxsa0002:8443/identityiq </Location> <Location /> ProxyPass https://ncdlxxxasa0002:8443/identityiq ProxyPassReverse https://ncdlxxxasa0002:8443/identityiq </Location> 我有以上三个Proxypass的基础上的位置。 第一个条件“/ stores / identityiq”获取输出上下文为“/ identityiq”,它被configuration为第二个代理传递的源。 所以,我终于被redirect到了第二个条件的ProxyPassReverse而不是第一个条件。 我的意图是 case1:如果Location / stores / identityiq / foo输出必须是/ stores / identityiq / foo case2:如果Location / identityiq / foo输出必须是/ identityiq / foo

Apache返回403禁止

我有使用Slim 3.0框架在PHP 7.0.22中编写的API项目。 应用程序API使用弹性负载平衡器(此时有一台服务器运行)在AWS(EC2)服务器上运行,使用Ubuntu 14.04.5,Apache 2.4.7。 大多数时候请求返回有效的响应,但其中一些返回“403禁止”(返回有效响应的相同请求) 我检查了Apache日志,但没有任何东西。 我认为堵塞来自服务器。 我试图找出是否有任何一种模块可以导致这种情况。 但我没有find问题。 模块列表: Array ( [0] => core [1] => mod_so [2] => mod_watchdog [3] => http_core [4] => mod_log_config [5] => mod_logio [6] => mod_version [7] => mod_unixd [8] => mod_access_compat [9] => mod_alias [10] => mod_auth_basic [11] => mod_authn_core [12] => mod_authn_file [13] => […]

IBM HTTP Server(IHS)反向代理和SSL

我需要创build一个采用https:// server1:6883并将其代理到https:// server2:6883的IHS反向代理,但与其他ServerFault问题不同,初始连接需要为https而不是http。 我有以下… LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so Listen 6883 <VirtualHost *:6883> SSLEnable SSLProxyEngine On KeyFile /opt/IBM/HTTPServer/cert/wlpkey.kdb ProxyPass / https://server2:6883/ </VirtualHost> 但是error_log表示:SSL0227E:SSL握手失败,在密钥文件中找不到指定的标签。 标记='(null)的 我怀疑问题是我需要两个KeyFiles:一个用于代理收件人,一个用于启用SSL / TLS。

当设置一个自定义的PassengerRuby,我真的不得不安装那个ruby的乘客gem?

根据SLES(12SP2),我真的很努力地使乘客5工作与多个ruby。 有一件事我没有预料到,我需要为每个设置为PassengerRuby的ruby安装一次乘客gem,否则使用该ruby的应用程序将不会启动。 我最初安装乘客5.0.18通过RPM与zypper,然后安装ruby安装自定义ruby。 如果我没有首先安装该ruby的乘客gem,将Apache(2.4)指向其中一个使用PassengerRuby /opt/rubies/ruby-2.4.2/bin/rubyruby,我会收到以下消息(LoadError for phusion_passenger): [ 2017-09-16 09:44:52.7828 23517/7ff290068700 App/Implementation.cpp:303 ]: Could not spawn process for application /srv/www/apps/helloworld/app: An error occured while starting up the preloader. Error ID: d6436e69 Error details saved to: /var/run/passenger/passenger-error-oiP5jq.html Message from application: cannot load such file — phusion_passenger (LoadError) /opt/rubies/ruby-2.4.2/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' /opt/rubies/ruby-2.4.2/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/lib64/passenger/5.0.18//helper-scripts/rack-preloader.rb:73:in `init_passenger' /usr/lib64/passenger/5.0.18//helper-scripts/rack-preloader.rb:152:in `<module:App>' /usr/lib64/passenger/5.0.18//helper-scripts/rack-preloader.rb:29:in […]

基于Apache中的主机url的条件反向代理

我有两个网站部署在两个端口81和82在Apache中 <VirtualHost *:81> DocumentRoot "D:/WebApps/App1" ServerName localhost <Directory "D:/WebApps/App1"> Require all granted </Directory> </VirtualHost> <VirtualHost *:82> DocumentRoot "D:/WebApps/App2" ServerName localhost <Directory "D:/WebApps/App2"> Require all granted </Directory> </VirtualHost> 我做了两个DNS条目如下 app1.domain.com <server ip> app2.domain.com <server ip> 我想在端口80上configuration反向代理服务器,以便使用app1.domain.com进行的请求代理到端口81 ,使用app2.domain.com进行的请求代理到端口82 我到目前为止所尝试的是 – <VirtualHost app1.domain.com:80> ProxyPreserveHost On ProxyRequests Off ServerName app1.domain.com ServerAlias app2.domain.com ProxyPass / http://localhost:81/ ProxyPassReverse / http://localhost:81/ </VirtualHost> […]

Kerberos /仅在某些IP地址的Apache中进行身份validation协商

我有一个内部活动目录下的Kerberos身份validation的Apacheconfiguration: <Location /login/sso> AuthType Kerberos KrbAuthRealms the.active.directory KrbServiceName HTTP/tthe.active.directory Krb5Keytab /etc/apache2/the.active.directory.keytab KrbMethodNegotiate on KrbMethodK5Passwd off require valid-user </Location> 但是,我不希望身份validation发生在用户从networking外部进行连接时,因为它不在活动目录中,而是应该显示替代页面而没有其他交互。 我可以使用以下方法实现替代页面: ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=/login\alternative"></html>" 但是,要将用户redirect到另一个页面,在Chrome浏览器中访问该URL时会出现用户名/密码对话框。 如果客户端IP来自内部networking(本例中为10.0.0.0),如果不是,可以将Apacheconfiguration更改为只使用此位置指令,如果不是,请将该位置redirect到另一个URL? 或者,如果有一个configuration更改,我可以做,以防止在Chrome浏览器的popup,也将是有用的。

如何设置IP特定的虚拟主机?

以下是我目前的sites-available.conf: <VirtualHost *:80> ServerAdmin heuyie@localhost DocumentRoot /var/www/html/wordpress ServerName heuyie.com ServerAlias www.heuyie.com <Directory /var/www/html/wordpress> Options FollowSymLinks AllowOverride All </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> 我想在此服务器上托pipe另一个域,所以我想为此虚拟主机指定IP。 所以,我重写了第一行: <VirtualHost 172.20.30.40:80> 然后,事情停止工作。 为什么? 目前,这是该服务器上唯一的域名。 谢谢!

周期fopen()请求服务器php / apache饱和

我有以下的PHP脚本: if (fopen("http://google.com/", "r")) { return true; } return false; 这个脚本执行5秒钟。 它可能会带来PHP或Apache?

我怎么能在16GB RAM的m4.xlarge AWS实例中设置prefork mpm

背景:在ELB后面有六个networking服务器,每个networking服务器运行两个虚拟主机站点。 我的httpd.conf文件没有configuration为prefork MPM或工人MPM或事件MPM。 我试过了:我检查了下面的path,发现prefork mpmpath的默认configuration:usr / share / doc / httpd24-2.4.23 / httpd-mpm.conf # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxRequestWorkers: maximum number of server processes allowed to […]

如何在apache后面运行node.js

我使用proxypass在apache 2.4后面运行proxypass 我努力了 ProxyPass /node http://localhost:4200 ProxyPassReverse /node http://localhost:4200 这部分工作,因为源文件没有/node来正确加载文件和Apache尝试加载根/下的src文件。 如何启动node.js服务于http://localhost:4200/node ?