zoukankan      html  css  js  c++  java
  • 关于apache 路径转发的一些问题

    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 

    2.centos 6.2 转发的文件 跟  ubuntu win7 都不一样

    <VirtualHost 192.168.44.244:80>
    #ServerAdmin webmaster@dummy-host.example.com
    #DocumentRoot /www/docs/dummy-host.example.com
    #ServerName ux.org.hc360.com
    #ErrorLog logs/dummy-host.example.com-error_log
    #CustomLog logs/dummy-host.example.com-access_log common

     
    ProxyPass /s/a http://www.baidu.com
    #ProxyPassReverse /s/a http://www.baidu.com
    SetEnv force-proxy-request-1.0 1
    SetEnv proxy-nokeepalive 1
    </VirtualHost>

    ubuntu 

    <modue if ..c>

    </module>

  • 相关阅读:
    学习BoolanC++笔记_03(C++面向对象高级编程(上)第三周)
    学习Lua笔记_02(第二章 类型与值)
    学习Lua笔记_01(第一章 开始)
    学习Lua笔记_00(预备)
    学习BoolanC++笔记_02(C++面向对象高级编程(上)第二周)
    web基础(上篇)
    使用Hexo搭建自己的博客网站
    JDK17安装
    安装并配置nodejs
    Linux 常用命令
  • 原文地址:https://www.cnblogs.com/freeDesignLife/p/3972388.html
Copyright © 2011-2022 走看看