Author Topic: Apache proxy pass to admin panel  (Read 5889 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Apache proxy pass to admin panel
« on: February 03, 2018, 10:12:30 AM »
Hi
I can access CentOS web panel using the IP like http://11.22.33.44:2031/admin and now i want to access it using subdomain/apache reverse proxy. I placed the following apache configuration for reverse proxy in conf.d folder but when i access the subdomain http://panel.mydomain.org the page is redirected to the default site.

I have not created the subdomain in centos web panel although i have it in my hosting providers DNS manager.

# /usr/local/apache/conf.d/panel.conf

<VirtualHost 11.22.33.44:80>

    ServerName panel.mydomain.org

    LogLevel debug
    ErrorLog /usr/local/apache/logs/panel-error.log

    ## don't loose time with IP address lookups
    HostnameLookups Off

    ## needed for named virtual hosts
    UseCanonicalName Off

    ## configures the footer on server-generated documents
    ServerSignature Off

    ProxyRequests Off
    ProxyPreserveHost On

    <Proxy /admin>
      Order deny,allow
      Allow from all
    </Proxy>

    ProxyPass /admin/  http://localhost:2031/admin/
    ProxyPassReverse /admin/ http://localhost:2031/admin/

</VirtualHost>

Any insights will be appreciated.
Thanks