Using Apache HTTPD 2.2 web server in RHEL 6 with Name based virtual hosting. Trying to configure the Proxy for one of my web site . (FYI: its for kibana dashboard)

    ServerName admin.kibana.com
    ServerAlias www.admin.kibana.com
    DocumentRoot /opt/kibana
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    <Directory /opt/kibana>
            Options -Indexes FollowSymLinks -MultiViews
            AllowOverride all
            Order allow,deny
            allow from all

    ErrorLog logs/admin.error.log
    LogLevel error
    CustomLog logs/admin.log combined

    ProxyRequests off
    ProxyPreserveHost On
    ProxyVia On

    <Proxy *>
    Order deny,allow
    Allow from all

    ProxyPass /
    ProxyPassReverse /


Have the local host entry in C:\Windows\System32\drivers\etc\hosts and able to view the page and content and everything is working fine.  admin.kibana.com  www.admin.kibana.com

Now the actual problem comes. Even if I try to browse below domains still web page is being served


Using Rewrite rules helps me, however it stops serving the actual application from back-end server. Can I do something with only using Proxy and virtual host configuration? please suggest. thanks in advance.

1 Answer 1


if you only have 1 Virtualhost this will be used as a fallback for all the requests. what you can do:

  • a RewriteRule that reject all other domains. If yours doesn't work maybe you got it wrong.

  • another VirtualHost that will be the default and will always give back 503


  • Will create 2 virtual hosts or more in future. Its pain full, however understood your point. hint is who becomes your default host, if nothing matches. Solution is: in the httpd.conf use default virtual host section and then 1. define all the possible host names and redirect them to custom or error page. 2. if you hate predicting the host name, use regex with rewrite rules which can exclude the domain which we are using for actual virtual hosts. Thanks @diego Roccia Sep 8, 2017 at 8:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .