proxypass

Nginx won't use custom 502 error page

允我心安 提交于 2020-01-17 05:16:21
问题 I am trying to display a custom 502 error page when webserver behind (upstream) is offline, but it doesn't work : it continues displaying default 502 error page (and I'm sure upstream is offline). My file organization is the following : Static files are under /var/web/example.org/www/res (example: /var/web/example.org/www/res/robots.txt ) ; Error pages are under /var/web/example.org/www (example: /var/web/example.org/www/502.html ). This is because i don't want error pages (not coming from

Nginx won't use custom 502 error page

血红的双手。 提交于 2020-01-17 05:16:05
问题 I am trying to display a custom 502 error page when webserver behind (upstream) is offline, but it doesn't work : it continues displaying default 502 error page (and I'm sure upstream is offline). My file organization is the following : Static files are under /var/web/example.org/www/res (example: /var/web/example.org/www/res/robots.txt ) ; Error pages are under /var/web/example.org/www (example: /var/web/example.org/www/502.html ). This is because i don't want error pages (not coming from

%0 is not replaced by server name when used with Apache's ProxyPassMatch

烂漫一生 提交于 2020-01-13 03:54:26
问题 Problem: %0 is not replaced by server name (i.e. test.local) when used with ProxyPassMatch. <VirtualHost *:80> UseCanonicalName Off # %0 is replaced by server name (works) VirtualDocumentRoot /Users/mattes/sites/%0 # %0 is replaced by an empty string (problem!) ProxyPassMatch ^(/.*\.php)$ fcgi://127.0.0.1:9000/Users/mattes/sites/%0/$1 </VirtualHost> Work-around: I found an interesting blog post here: http://holtstrom.com/michael/blog/post/225/Apache-2.2-Proxy.html. Basically, Michael uses

Duplicated status code in response

老子叫甜甜 提交于 2020-01-03 04:29:08
问题 I usually deploy Java webapps in Tomcat servers and access them through an Apache proxy, using proxy_ajp. The thing is, in my latests setups (which are all basically the same) I see that the status code I get in all my requests is duplicated (i.e., "Status Code:200 200"). I get this in every browser, in Postman, and for any status code I might get, and everything seems to work fine, but I'm concerned my setup might not be optimal. Although I can't find a solution, I have narrowed the issue

Apache2 ProxyPass for Rails App Gitlab

こ雲淡風輕ζ 提交于 2019-12-27 11:45:56
问题 I am attempting to setup a proxy with Apache2 so that incoming requests to http://myipaddress.com go to http://localhost:3000/ where I have Gitlab ( a rails app ) running. The following is what I have in my Apache configuration file on Ubuntu 10.04. I can successfully access the gitlab default page initially, but any subsequent requests performed by me by clicking on other pages after that go to a 404 NOT FOUND page. I can manually enter /gitlab/ in front of any of these failed redirects and

Multiple Rails apps over NGINX (reverse proxy)

懵懂的女人 提交于 2019-12-25 12:42:40
问题 I have two rails apps on my server. Each of them is running on a Thin server. I am also using NGINX. This is my NGINX configuration file: server{ location /blog { proxy_pass http://127.0.0.1:8082; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location /website1 { proxy_pass http://127.0.0.1:3000; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header

Multiple Rails apps over NGINX (reverse proxy)

三世轮回 提交于 2019-12-25 12:41:49
问题 I have two rails apps on my server. Each of them is running on a Thin server. I am also using NGINX. This is my NGINX configuration file: server{ location /blog { proxy_pass http://127.0.0.1:8082; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location /website1 { proxy_pass http://127.0.0.1:3000; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header

Cannot run multiple NodeJs server on one subdomain

半世苍凉 提交于 2019-12-23 09:49:36
问题 I am trying to run multiple NodeJs server for (official) Kik Chatbots with different webhooks from one Subdomain on my webserver. However, I am not able to do that. For one bot it works just fine. This is my setup for one working NodeJs server only: Lets assume all webhooks are located at https://bots.mydomain.com app.js: 'use strict'; let util = require('util'); let http = require('http'); let request = require('request'); let Bot = require('@kikinteractive/kik'); let bot = new Bot({

ProxyPass and DocumentRoot on one domain

牧云@^-^@ 提交于 2019-12-21 03:21:51
问题 Let's say I have the following configuration: <VirtualHost domain.com> # Server names, admins, logs etc... ProxyVia On ProxyRequests Off <Location "/"> ProxyPass http://localhost:8080/tomcat-webapp/ ProxyPassReverse http://localhost:8080/tomcat-webapp/ Order allow,deny Allow from all </Location> </VirtualHost> Now, I want the address domain.com/forum to display conent of my MyBB forum, which files are inside /var/www/forum directory. How to accomplish this? 回答1: Actually, I resolved this

Spring Boot and Nginx integration

杀马特。学长 韩版系。学妹 提交于 2019-12-20 09:46:02
问题 In my project, web app is developed using Spring boot with default tomcat server. I am using NGINX as load-balancer and have configured my spring-boot-web-app in NGINX configuration as follows: location /spring-boot-web-app { proxy_pass http://spring-boot-web-app/ } http { upstream /spring-boot-web-app { server <IP_of_spring_boot_app>:<Port_of_spring_boot_app> } } Now lets say NGINX IP and port as nginx_ip and nginx_port respectively. Also working URL for my web app as: http://web_app_ip:web