On 10/14/05, Gino LV. Ledesma <[EMAIL PROTECTED]> wrote:
> How is httpd configured? I don't fully understand the relationship
> between www.example1.com and sub.example1.com -- is sub.example1.com
> totally independent of the former and you want to prevent the former's
> /svn mapping to be accessible?
They're totally independent. /svn *shouldn't* be accessible from
sub.example1.com.
The relevant sections of httpd.conf (and included conf files) are below:
# NOTE: Actual domains replaced with canonical
# example.com example domains
----- /etc/httpd/conf.d -----
#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf
# lines elided ...
ServerName linuxdev.asiaonline.net.ph:80
UseCanonicalName Off
DocumentRoot "/var/www/html"
NameVirtualHost *:80
# ... lines elided
<VirtualHost *:80>
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/html
ServerName www.example1.com
</VirtualHost>
----- end -----
----- /etc/httpd/conf.d/ssl.conf -----
LoadModule ssl_module modules/mod_ssl.so
Listen 443
# ... lines elided
<VirtualHost _default_:443>
ServerName www.example1.com
SSLEngine on
# ... lines elided
</VirtualHost>
----- end -----
----- /etc/httpd/conf.d/subversion.conf -----
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
AllowOverride none
DAV svn
SVNAutoVersioning on
SVNParentPath /data/subversion
# ... lines elided
AuthName "SVN Repository"
Require valid-user
Satisfy any
</Location>
----- end -----
----- subsite.conf -----
<VirtualHost *:80>
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /data/subsite/
ServerName *.subsite.example1.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^[^.]+\.subsite\.example1\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^([^.]+)\.subsite\.example1\.com(.*)
/data/subsite/home.php?user=$1&path=$2
</VirtualHost>
------ end -----
What I tried so far:
* Enclosing "<Location /svn>" inside a VHost directive: didn't work--
it broke access to /svn via HTTPS
What I *didn't* try, and why:
* Putting "<Location /svn>" inside the ssl.conf VHost-- I need /svn to
be also accessible via ordinary HTTP. Also, I need to keep the
Location block in one place (I could possibly move the conf outside
/etc/httpd/conf.d, and do an include, but I haven't tried it.
Any tips, suggestions?
--
JM Ibanez --
Sean [Reading a letter from Will] "Sean, if the
Professor calls about that job, just tell him,
sorry, I have to go see about a girl." Son of a
bitch. He stole my line.
- from "Good Will Hunting"
-----
http://www.livejournal.com/~jmibanez/
http://www.mycgiserver.com/~butiki/
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph