Apache Proxy problem

Discussion in 'Apache' started by hzzg6y, Oct 1, 2012.

  1. #1
    We are facing a weird problem with regard to accessing the /var/www/html/ files from the Domain URL www.example.com/index.html. I am on Centos5.5 on VPS.
    when I am using Proxy in Apache httpd.conf file.

    My Apache settings :

    ProxyRequests On
    ProxyVia On

    <Proxy *>

    Order deny,allow
    Allow from all

    </Proxy>

    Header set Access-Control-Allow-Origin "*"

    <VirtualHost *:80>
    ServerAdmin
    ServerName example.com
    ServerAlias www.example.com
    ErrorLog logs/example.com-error_log
    CustomLog logs/example.com-access_log common
    Options +Multiviews
    AddDefaultCharset UTF-8
    ProxyPass / http://www.example.com:5280/http-bind/
    ProxyPassReverse / http://www.example.com:5280/http-bind/
    </VirtualHost>



    [root@example logs]# togglesebool httpd_can_network_connect
    togglesebool: SELinux is disabled
    [root@example logs]#


    We tried this to fix it with no success:

    sudo /usr/sbin/setsebool -P httpd_can_network_connect 1

    Error message in logs :

    [Mon Oct 01 03:30:14 2012] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 200.115.45.278:5280 (www.example.com) failed
    [Mon Oct 01 03:30:14 2012] [error] ap_proxy_connect_backend disabling worker for (www.example.com)


    When I disable/ remove the proxy configuration in httpd.conf... I am able to access www.example.com/index.html.

    Please can some advice me how can I access index.html file from /var/www/html location with keeping proxy settings.
     
    hzzg6y, Oct 1, 2012 IP
  2. hzzg6y

    hzzg6y Greenhorn

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #2
    hzzg6y, Oct 1, 2012 IP
  3. sahabcse

    sahabcse Well-Known Member

    Messages:
    272
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    140
    #3
    check the Mod_security in httpd.conf
     
    sahabcse, Oct 3, 2012 IP