我在AIX 6.1上运行Apache 2.4.20作为反向代理,以便访问运行在后端服务器上的Oracle商务智能11.1.1.7.150120。 反向代理修改原始HTML代码导致HREF锚点设置错误的地方。 这会导致菜单出现故障(锚点不再位于桌面结构上)。 原始HTML代码(部分): <a id="selEditDashboard" class="NQWMenuItem NQWMenuItemWIconMixin" href="javascript:void(null)" onclick="EditPage('saw.dll?EditDashboard&PortalPath=%2fusers%2fweblogic%2f_portal&Page=page%201&Done=saw.dll%3fDashboard');return false;" > <table class="MenuItemTable" cellspacing="0" cellpadding="0"> <tr> <td class="MenuItemIconCell"> <img border="0" src="res/sk_FusionFX/catalog/edit_ena.png" alt="Dashboard bearbeiten"/> </td> <td class="MenuItemTextCell" colspan="2">Dashboard bearbeiten </td> </tr> </table> </a> HTML代码来自反向代理: <a id="selEditDashboard" class="NQWMenuItem NQWMenuItemWIconMixin" href="javascript:void(null)" onclick="EditPage('saw.dll?EditDashboard&PortalPath=%2fusers%2fweblogic%2f_portal&Page=page%201&Done=saw.dll%3fDashboard');return false;" > </a> <table class="MenuItemTable" cellspacing="0" cellpadding="0"> <tr> <td class="MenuItemIconCell"> <img border="0" src="res/sk_FusionFX/catalog/edit_ena.png" […]
所以我有我的最后一个“反向代理”问题固定关于“映射”一个端口到子文件夹再次感谢这个真棒社区。 我已经能够使用这个解决scheme了一段时间,但现在我面临一个新的问题。 情况是: 有一个网页设置(使用nginx)与此urlhttp://test.domain.com:8042/view.html 。 我需要各种各样的原因,这个端口变成一个子文件夹,并实现它(帮助),并获得http://test.domain.com/view/view.html 。 这个proxy_pass是: location ~/view(.*)$ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host:$server_port; proxy_pass http://test.domain.com:8042$1; 这个很棒。 我可以通过http://test.domain.com/view/view.html访问该页面。 这个页面上有几个websocket,其中一个也有8042端口。这个工作正常。 但是,其他websockets有不同的端口,例如8159.我已经添加了一个相应的proxy_pass到nginxconfiguration: location ~/cantrace(.*)$ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host:$server_port; proxy_pass http://test.domain.com:8159$1; 从Javascript这个websocket被称为通过 my_websocket = new WebSocket('ws://test.domain.com/cantrace/ws'); 但是这不起作用。 也没有 my_websocket = new WebSocket('ws://test.domain.com/view/cantrace/ws'); 但是,工作是什么? http://test.domain.com:8042/view.html 然后加载view.html上的其他websocket my_websocket […]
我需要在某些情况下禁用gzip,而不pipe客户端的Accept-*请求头。 我的Nginx的conf入口有以下指令: gzip off; more_clear_input_headers -t 'text/html' Accept Accept-Encoding; proxy_set_header Accept ""; proxy_set_header Accept-Encoding ""; 但是,下面的curl: curl '$URL' -H 'Pragma: no-cache' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-US,en;q=0.8,he;q=0.6' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: no-cache' -H 'Cookie: […]
Apache(2.4.x)是一个众所周知的服务器,性能优化已经被广泛讨论和logging。 不过,对于Apache反向代理(Nginx或其他任何其他软件背后)的情况,我想知道什么最适合Apache,只要涉及到性能。 考虑到这个非常简单的Nginxconfiguration: server { keepalive_timeout 300s; location / { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://localhost:8080; proxy_pass_header Content-type; } } 没有给出实际值(与硬件,交通和应用types紧密相关),与通常用于前端服务器的逻辑相比,逻辑应该在某些方面有所不同? 例如,当我们正在谈论服务器到服务器(硬件)时(甚至两台服务器(软件)通常在本地主机上进行通信), keepalive是一个很好的做法? 如果是的话,是否有一个基准开始? Apache将所有的Nginx请求视为同一个客户端还是X-Real-IPX-Real-IP或X-Forwarded-For将会使Apache考虑来自不同客户端的请求? 我猜就Apache而言,客户端是IP_SRC:Port 。 我的意思是,如果所有通过Nginx代理的请求被认为是一个客户端,那么Apache将如何尊重MaxConnectionsPerChild ? Apache与mod_prefork将如何分叉(或不)工人? 在这个MOD中,客户和工人是1:1的关系。 而且,由于工人一次不能处理多个客户,请求将会排队,直到有免费的工作人员可用? 有什么最好的做法应该注意这种设置? 有没有一种模式可以比另一种更好? 还是应该避免一个国防部?
我试图通过nginx来平衡一个web应用程序,它可以正常工作,我的web应用程序会调用带有子path的服务。 例如它的工作 http://example.com/luna/ 但不是 http://example.com/luna/sales 我的nginx.conf user nobody; worker_processes auto; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; map $http_upgrade $connection_upgrade { default upgrade; '' close; } upstream lunaups { server myhostserver1.com:8080; server myhostserver2.com:8080; } server { listen 80; server_name example.com; proxy_pass_header Server; location = / { rewrite […]
我有一台运行OS X Server 5.1.7的Mac Mini。 我有一个服务运行本地访问通过http://127.0.0.1:3000/ask (无需身份validation),我想使其可用于外部,但使用OS X服务器目录进行身份validation。 因此,在网站部分,我创build了一个名为intranet.mydomain.com的新网站,只有“Intranet用户”(我创build的一个组)才能访问。 这样做后,我尝试访问https://intranet.mydomain.com ,它要求input用户名和密码,并且与“Intranet用户”一部分用户的凭证一起使用。 现在,要设置反向代理,我转到该文件 /Library/Server/Web/Config/apache2/sites/0000_127.0.0.1_34543_intranet.mydomain.com.conf 并添加以下内容: ProxyPass /询问http://127.0.0.1:3000/ask ProxyPassReverse /询问http://127.0.0.1:3000/ask Directory节点之后。 现在,当访问https://intranet.mydomain.com/ask时 ,我到达了内部服务,但是没有请求authentication。 这应该是好的,我相信,因为在XMLconfiguration中只有Directory节点configuration了authentication: <Directory "/Library/Server/Web/Data/Sites/intranet.mydomain.com"> Options All -Indexes -ExecCGI -Includes +MultiViews AllowOverride None <IfModule mod_dav.c> DAV Off </IfModule> <IfDefine !WEBSERVICE_ON> Require all denied ErrorDocument 403 /customerror/websitesoff403.html </IfDefine> AuthType Digest AuthName "Realm ID 75040558" <Limit PUT DELETE […]
我有一个Nginx反向代理设置,并且可以正常使用SSL证书,包括标准和多SAN。 如果我设置了一个虚拟服务器,比如带有标准SSL的mysite.com,一切都很好。 如果我在浏览器中向域名mysite.co.uk添加相同的虚拟服务器,则会收到错误消息,说明该网站的证书无效。 我明白为什么我得到这个错误消息,我想知道的是我可以使用Nginx将mysite.co.uk转发到mysite.com以避免在浏览器中的错误信息? 我已经尝试在Nginx上重写,但我不认为这是做到这一点。 我不能在DNS级别执行此操作,因为我的客户端DNS不允许这样做。 这不仅仅是一个域,有很多,我需要保持低成本,而不是购买SAN SSL。 在此先感谢您的帮助。
我不知道为什么替代指令不起作用。 反向代理后面的应用程序是Liferay,因为它生成绝对url,所以我必须在代理中进行replace。 此外,我需要在请求发送到后端应用程序之前更改主机名称。 这是我的httpd conf: <VirtualHost *:443> ServerName site1.example.com SSLEngine On SSLCertificateFile /etc/httpd/conf/any.example.com.crt SSLCertificateKeyFile /etc/httpd/conf/any.example.com.key ProxyPass /Shibboleth.sso/ ! ProxyPass / http://10.0.0.4:8080/ ProxyPassReverse / http://10.0.0.4:8080/ RequestHeader set Host "site2.example.com" ProxyPreserveHost On # Mandatory for changing the host AddOutputFilterByType SUBSTITUTE text/html Substitute "s|site2.example.com|site1.example.com|ni" </VirtualHost> 问题是我总是得到结果(HTML)url指向site2.example.com。 例如,我有: <a href="https://site2.example.com/link">Here!</a>
我一直在寻找这个相当长的一段时间,我没有find任何东西。 我通过各种论坛search,做了一些谷歌search,他们什么都没有。 我有一个服务器在Docker容器中运行我所有的应用程序(例如Plex,Nextcloud等)。该服务器还有一个安装了Wordpress的Nginx Docker容器。 现在,我们说内部networking中指向Nextcloud的IP是192.168.0.200:9000 。 我已经validation了,当我使用直接的IPlogindocker工程。 但是,在设置Nginx代理的时候,事情就有些失控了。 我也有Cloudflare保护,当我设置Cloudflare,它连接到docker罚款。 (假设域名是cloud.abc.com )但是,有一个内联脚本错误: Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-Vv06cSNCZln6C3GDj3jl163TqpSEik9IA1SYp3knJ/E='), or a nonce ('nonce-…') is required to enable inline execution. 当我禁用Cloudflare时,当我尝试连接时,Chrome会出现ERR_CONNECTION_REFUSED错误。 我猜测SSL的问题,但我没有networking的经验,所以我迷失在这里。 这是我在Nextcloud中的config.php: <?php $CONFIG = array ( 'memcache.local' => […]
我有一个docker-compose,它创build一个http服务器的容器,它不会被jwilder的nginx反向代理拾取,但是它可以手工实例化。 version: '2' services: mongo: image: tutum/mongodb expose: – "27017" environment: – AUTH=no backend: build: context: "./instance" hostname: instance ports: – "1080:8080" expose: – "8080" links: – mongo frontend: build: context: "./instancegui" ports: – "80" environment: – VIRTUAL_HOST=some.host.com – LETSENCRYPT_HOST=some.host.com – [email protected] 逆向代理生成的configuration文件表示上游{… DOWN} 但是当像这样实例化时容器运行良好 docker run –name group_frontend_1 -p 80 -e "VIRTUAL_HOST=some.host.com" -e "LETSENCRYPT_HOST=some.host.com" […]