Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I added following into my httpd.conf (after VirtualHost):

<VirtualHost *:80>
    ServerName XXX.XXX.XXX

    <Directory proxy:>
        Order allow,deny
        Allow from
        Allow from
        Deny from all

    ProxyPass / http://XXX.XXX.XXX/

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^/admin/$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]


yet, I'm able to access my VirtualHost from other IPs:

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.4 (Santiago)
# uname -a
Linux XXXXX.XXXXX.XXX 2.6.32-358.18.1.el6.x86_64 #1 SMP Fri Aug 2 17:04:38 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
# httpd -V
Server version: Apache/2.2.15 (Unix)
Server built:   Aug  2 2013 08:02:15
Server's Module Magic Number: 20051115:25
Server loaded:  APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
# rpm -q httpd
share|improve this question

2 Answers 2

I believe what you're looking for is:

<Directory proxy:>
    Order deny,allow
    Deny from all
    Allow from
    Allow from

The order of Order matters :-)

share|improve this answer
Really? I thought "Order" takes care of that (not lines)... – alexus Oct 15 '13 at 19:02
i upvote as some of that answer is right, yet it still didn't solve my issue, so I posted "right answer"), thanks! – alexus Oct 15 '13 at 19:37
up vote 1 down vote accepted

I found answer from: mod_proxy - Apache HTTP Server and I test it (It works!(TM)):

<Proxy *>
        Order deny,allow
        Deny from all
        Allow from
        Allow from
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.