View Single Post
Old 05-16-2003, 10:29 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
Not sure if this is the way you want to do it, but you could have:
Code:
Listen 80
Listen 10000
NameVirtualHost 12.34.56.78:80
NameVirtualHost 12.34.56.78:10000 

<VirtualHost _default_:80>
    ServerAdmin web@domain.com
    DocumentRoot /var/www/open
    ServerName open.domain.com
    ServerAlias open
    ErrorLog logs/open-error.log
    CustomLog logs/open-access.log combined
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/var/www/open">
       Options Indexes FollowSymLinks MultiViews
       AllowOverride None
       Order allow,deny
       Allow from all
    </Directory>
</VirtualHost>

<VirtualHost _default_:10000>
    ServerAdmin web@domain.com
    DocumentRoot /var/www/hidden
    ServerName hide_me.domain.com
    ServerAlias hide_me
    ErrorLog logs/hide_me-error.log
    CustomLog logs/hide_me-access.log combined
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/var/www/hide_me">
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       Order allow,deny
       Allow from all
    </Directory>
</VirtualHost>
in your httpd.conf file, if a user is requesting port 10000, then they are directed to a directory, where .htaccess has full control, if its a normal request on port 80, they are directed to a directory, where .htaccess has no permission

I dont know if it is possible to set the same DocumentRoot in both entries or not, since this is an issue I've never tried myself.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote