我有一个启用了mod_proxy的Apache webserver和一个虚拟主机proxy.domain.com。 此代理configuration为通过AuthType Basic提示用户input凭据。 然后,通过ProxyPass和ProxyReverse通过代理可以访问web.domain.com的内容。 但是,REMOTE_USERvariables是空的。 我用mod_rewrite和mod_headers读了不同的东西来实现这一点,但是我所有的尝试都失败了。 有人比我幸运吗? 谢谢。
我有两个启用了mod_proxy的Apache服务器。 我想知道如何使用相同的端口(80)将“请求”从“Apache服务器A”传递到“Apache服务器B”。 在“服务器A”与内部IP:192.168.0.5我configuration了DNS,我也用它作为我的邮件服务器。 在“服务器B”与内部IP:192.168.0.10我有我自己的云服务器。 今天当我访问wwww.mydomain.com或www.mydomain.com/webmail一切正常,因为内容都在“服务器A”,我需要的是当有人试图访问owncloud.mydomain.com他们可以访问我的服务器B而不会将它们redirect到owncloud.mydomain.com:81等其他端口,我只想使用端口80。 其实我得到一个redirect循环,因为当我尝试redirect,我猜“服务器A”是由自己得到相同的请求。 我已经设置我的虚拟主机在同一个“服务器A”工作,我想要“redirect”到另一台服务器使用相同的端口和URL(owncloud.mydomain.com)。 我不想使用另一个端口redirect。
目前我有一个应用程序运行在8080前端mod_proxy。 <Location /hudson> Order allow,deny Allow from all ProxyPass http://localhost:8080/hudson ProxyPassReverse http://localhost:8080/hudson </Location> 我需要阻止TCP 8080,但不是本地主机如何做到这一点与IPtables?
我正在尝试为通过SSL运行tomcatembedded式服务器的应用程序设置反向代理。 该应用程序需要在端口9002上运行SSL,所以我没有办法为这个应用程序“禁用SSL”。 当前的安装模式如下所示: [192.168.0.10:443 – Apache with mod_proxy] –> [192.168.0.10:9002 – Tomcat App] 在Google如何做这样的设置(和testing)之后,我碰到了这个: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/861137 这导致我的当前configuration(尝试模拟wget的 – secure-protocol = sslv3选项) /etc/apache2/sites/enabled/default-ssl: <VirtualHost _default_:443> SSLEngine On SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key SSLProxyEngine On SSLProxyProtocol SSLv3 SSLProxyCipherSuite SSLv3 ProxyPass /test/ https://192.168.0.10:9002/ ProxyPassReverse /test/ https://192.168.0.10:9002/ LogLevel debug ErrorLog /var/log/apache2/error-ssl.log CustomLog /var/log/apache2/access-ssl.log combined </VirtualHost> 问题是错误日志显示错误:14077102:SSL例程:SSL23_GET_SERVER_HELLO:不支持的协议 完整的请求日志: [Wed Mar 13 20:05:57 […]
在Debian 8.0上,我试图让Apache 2.4.10pipe理一个GitLab CE 7.10 Omnibus作为虚拟主机。 设定和目标 Apache 2已经安装并运行了几个虚拟主机,它们看起来都像vhost.example.com 。 我想configurationApache和GitLab,以便git.example.com被Apache处理以显示GitLab Web界面。 为此,我遵循https://stackoverflow.com/a/25809733/4352108中所述的过程。 问题 我可以在git.example.com上使用GitLab的主页git.example.com ,但是我无法访问任何其他资源,如CSS或图标。 Apache日志显示了四个错误: [Sun May 10 20:24:57.146329 2015] [authz_core:error] [pid 4141] [client 1.2.3.4:80] AH01630: client denied by server configuration: /opt/gitlab/embedded/service/gitlab-rails/public/assets/application-TOKEN.css, referer: http://git.example.com/ 在search网页并尝试了几个变化,我卡在这里。 有没有人有一个如何解决这个问题的想法? configuration文件 另外这里是我使用的“有趣的”configuration文件: /etc/apache2/sites-enabled/git.conf : <VirtualHost git.example.com:80> ServerAdmin [email protected] DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public ServerName git.example.com ServerAlias git.example.com ProxyPreserveHost On <Location […]
当试图通过我的Apache2服务器访问ws:// localhost:8080时,出现错误500。 该服务器运行OpenSuse Leap 42.1和Apache 2.4.16。 这些Apache2模块已启用:mod_proxy,mod_proxy_http,mod_proxy_wstunnel。 当从本地networking调用请求时,一切工作正常。 URL示例: http://<myhost-ip-address>/api/ws/<some-url> 。 它返回状态101和响应: Upgrade: websocket 。 没关系。 来自外部networking的同一种请求失败。 url示例: ws://www.mysite.com/api/ws/<some-url> 。 它返回错误500。 Apache访问日志包含: GET /api/ws/<some-url> HTTP/1.1" 500 … Apache错误日志包含: [proxy:warn] AH01144: No protocol handler was valid for the URL /api/ws/<some-url>. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included […]
我正在尝试在lighttpd中设置一个反向代理,这样/ mobile / video下的所有请求(只有这些请求)才会被redirect到辅助Web服务器的/目录。 这在Apache中是相当容易的,但我不能在我的生活中弄清楚如何在lighttpd中这样做。 $HTTP["url"] =~ "^/wsmobile/video/" { url.rewrite-once = ( "^/wsmobile/video/(.+)" => "/$1" ) proxy.server = ( "" => ( ( "host" => "210.200.144.26", "port" => 9091 ) ) ) } 我已经尝试使用http [“url”]指令,但lighttpd只是忽略这些请求,并继续传递完整的URL到辅助服务器,当然扼杀和抛出404s。 但是,如果我做全局重写,那么一切都被转发到辅助服务器,这也不是我想要的。 我如何去做这个任务?
我的服务器上有多个django应用程序,它们在自己的虚拟主机中运行,绑定到不同的端口。 (我这样做是为了隔离每个WSGIProcessGroup)。 现在我想代表每个应用程序到80端口为简单的事情。 对于一个应用程序,我做这样的事情: Listen 8101 <VirtualHost 127.0.0.1:8101> WSGIProcessGroup app1 WSGIDaemonProcess app1 display-name=%{GROUP} WSGIScriptAlias /app1 "/var/django_apps/app1/app1.wsgi" </VirtualHost> <VirtualHost *:80> ProxyPass /app1 http://localhost:8101/app1 ProxyPassReverse /app1 http://localhost:8101/app1 </VirtualHost> 现在,为了简化启用或禁用某些应用程序,当我有另一个应用程序运行时,我有另一个.conf文件包含这个: Listen 8102 <VirtualHost 127.0.0.1:8102> WSGIProcessGroup app2 WSGIDaemonProcess app2 display-name=%{GROUP} WSGIScriptAlias /app2 "/var/django_apps/app2/app2.wsgi" </VirtualHost> <VirtualHost *:80> ProxyPass /app2 http://localhost:8102/app2 ProxyPassReverse /app2 http://localhost:8102/app2 </VirtualHost> 但是这个第二个<VirtualHost *:80>没有被使用,考虑到apache的configuration语法,这似乎是正常的。 不过 ,我希望这一点的configuration能够在应用程序声明旁边生存,所以我可以在一个文件中拥有属于自己的东西。 我能为此做些什么? 我正在考虑使用include指令,但是我对apacheconfiguration知之甚less,而且我不认为我可以自己find一个解决scheme:) […]
我真的不知道… 我有一个Java Web应用程序,它将会话ID存储在URL中,而不是使用Cookie。 我想在两个tomcat服务器上运行应用程序,并使用Apache服务器将它们作为负载均衡的前端。 __ tomcat1 Apache —-/ \__ tomcat2 通过在Tomcat server.xml文件中将jvmRoute设置为tomcat1 ,url将变成http://url;jsessionid=id.tomcat1 。 所以可以通过查看URL来实现会话粘性,并将其路由到相应的服务器。 我知道mod_proxy和mod_jk ,并进行负载平衡,但他们的粘性会话只有在会话ID存储在cookie中时才起作用。 就我而言,会话ID是在URL中编码的。 我怎样才能做负载平衡?
我有两台服务器,一台是可在公司本地networking内部访问的开发服务器,另一台是面向公众的Web服务器。 开发服务器托pipe了几个工具,我们用来pipe理我们的项目在内部,但现在我们需要在外部访问它们,同时保持安全。 我使用ProxyPass和ProxyPassReverse指令在外部服务器上设置了mod_proxy,将外部请求映射到内部服务器。 我还在这些外部虚拟主机上设置了身份validation,以提供外部访问的安全性。 我还需要使用SSL进行外部访问,但理想情况下,希望内部工具可以通过简单的HTTP访问内部网中的人员。 是否有可能实现这种行为,如果有的话,我应该使用哪些指令和Apache模块,以及在哪些服务器上安装?