Problem: Few days back we were working with Apache web server and were using it for proxy. We want to use HTTPD for directing requests to 8080 port where Apache tomcat was running.
We configured the proxy settings successfully and it was working perfect. Following is the example of settings for proxy configuration:
proxy_* modules should be loaded for correct execution of this setting. Check /etc/httpd/conf/httpd.conf file to verify whether modules are loaded or not (proxy_* modules should not be commented in the file)
Add following lines in etc/httpd/conf/httpd.conf file :
ProxyRequests Off
ProxyPass /app1 http://127.0.0.1:8080/app1
ProxyPassReverse /app1 http://127.0.0.1:8080/app1
ProxyPass /app2 http://127.0.0.1:8080/app2
ProxyPassReverse /app2 http://127.0.0.1:8080/app2
one fine day we were unabe to access app1 and app2 using proxy, when we checked logs we found following error in error_log (/etc/httpd/logs/error_log)
[error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed
[error] ap_proxy_connect_backend disabling worker for (127.0.0.1)
Solution: Run following command
# /usr/sbin/setsebool httpd_can_network_connect 1
OR
# /usr/sbin/setsebool httpd_can_network_connect true
Or you can also set the security settings, Go to Security Level configurations and Change Tab to SELinux. And modify SELinux policy Check “Allow HTTPD scripts and modules to connect to the network” under HTTPD service.
You can add ‘-P’ if you want this change to persist over system restarts, eg:
/usr/sbin/setsebool -P httpd_can_network_connect 1
参考地址:http://fan.iteye.com/blog/624445
分享到:
相关推荐
apache Proxy Error apache Proxy Error apache Proxy Error apache Proxy Error
rk1808s0计算棒在x86机器上使用时,需要的程序
ngx_http_proxy_connect_module, 用于CONNECT请求处理的前向代理模块 名称 此模块为"连接"http方法提供支持,此方法主要用于通过代理服务器进行隧道SSL请求 。 目录 姓名 例子 安装 指令 proxy_connect proxy_...
备用nginx代理模块
Couldn't connect to server from the Internet. Perhaps direct connections are not allowed in the current network. To use proxy please check/specify these environment variables: - ...
The interactive HTTP proxy WebScarab – Installation.pdf
VC Proxy演示程序代码:是Visual C 专家门诊300问中的一个随书源码,简单的代理服务器程序,运行时提供代理服务,先启动服务才可以。来看一些参数定义: SOCKET user_proxy; //socket : 本地机器到PROXY 服务机 ...
使用nginx作为http/https正向代理ipm包,包含ngx_http_proxy_connect_module 模块,附带了第三方图片代理配置,带有缓存,可直接做图片服务器 下载后执行:rpm -ivh nginx-1.12.2-1.el7_4.ngx.x86_64.rpm 打包教程:...
用于nginx的http正向代理https使用的模块
欢迎使用Proxy_SQL_Logger :waving_hand: PostgreSQL代理服务器,用于记录用户SQL查询 :house:安装make && ./proxy_sql_logger --user_side localhost:8080 --server_side localhost:5432 --log_file logs.txt作者 :...
gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 镜像
解决代理转发post请求失败
增加了ngx_http_proxy_connect_module模块的,已经编译好的windows exe文件。 可以正向代理https请求。来源地址:https://github.com/dyq94310/nginx-build-msys2/releases 使用方法,放到从官网下的nginx windows...
HttpProxy HTTP代理服务器 HttpProxy HTTP代理服务器 HttpProxy HTTP代理服务器 HttpProxy HTTP代理服务器
教育网 搜狗免费代理 注意设置 端口号为 1998 本地服务器 127.0.0.1
Toran与Vagrant&Ansible代理开始使用Toran Proxy的示例/演示/个人用法-Packagist镜像请参阅Toran Proxy-请记住,人们为此进行了艰苦的工作,并继续这样做,而且让我们面对现实,它是PHP的出色依赖管理器。...
NULL 博文链接:https://cn-done.iteye.com/blog/1743191
$ npm install http-proxy-auth用法Connect/Express 和集成 var connect = require('connect');var httpProxy = require('http-proxy');var proxyAuth = require('http-proxy-auth');var app = connect();var proxy...
# Check for connect to the specified host:port. # Check for URL (using HTTP GET or POST requests). # Load and combine proxies without checking. # Multithreaded. # Handle redirects. # Download proxy ...
# The port Node should listen to PORT=3000 # The proxy target PROXY_TARGET=https://pokeapi.co/ # Your corporate proxy url (comment this line if it is already set in your environment variables) ...