httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph A Nagy Jr <joseph_a_nagy...@charter.net>
Subject Re: [users@httpd] Virtual Hosting Woes.......
Date Sat, 20 Sep 2003 18:17:09 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 20 September 2003 13:12, Fortin, John {PBG} wrote this in an 
attempt to be witty or informative:
> I believe that since the IP addresses for your domains are the same,
> you need to use the hostname to differentiate between the sites like
> this:
>
> <VirtualHost www.Dom1.com:80>
> ServerName www.Dom1.com
> DocumentRoot /var/local/www/data/Dom1
> ErrorLog /var/log/Dom1-error_log
> CustomLog /var/log/Dom1-access_log common
> </VirtualHost>
>
> <VirtualHost www.Dom2.com:80>
> ServerName www.Dom2.com
> DocumentRoot /var/local/www/data/Dom2
> ErrorLog /var/log/Dom2-error_log
> CustomLog /var/log/Dom2-access_log common
> </VirtualHost>
>
> Good luck...
>
> --john
<snip>

Actually, he doesn't have to do that. I have one IP and my vhosts are 
set up thusly:

<VirtualHost *>
    ServerAdmin joseph_a_nagy_jr@charter.net
    DocumentRoot /linux/joseph-a-nagy-jr/
    ServerName joseph-a-nagy-jr.homelinux.org
    CustomLog /linux/logs/joseph-a-nagy-jr.access.log combined
    ErrorLog /linux/logs/joseph-a-nagy-jr.error.log
    ErrorDocument 404 /cgi-bin/404-error.pl
    ErrorDocument 403 "Forbidden"
    ScriptAlias /cgi-bin/ /linux/cgi-bin/
 <Directory />
        Options All Multiviews
 </Directory>
 <Directory /linux/cgi-bin>
     AllowOverride None
     Options None
     Order allow,deny
     Allow from all
 </Directory>
    Alias /icons/ "/var/www/icons/"
    <Directory "/var/www/icons">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
Alias /manual "/var/www/manual"
<Directory "/var/www/manual">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
     <Directory "/linux/images/friends/">
        AuthType Basic
        AuthName "Friends Only"
        AuthUserFile /etc/httpd/conf/passwords/friends-pics
        Require valid-user
     </Directory>
#     <Directory "/linux/joseph-a-nagy-jr/homework/">
#        AuthType Basic
#       AuthName "Authorized Users Only"
#       AuthUserFile /etc/httpd/conf/passwords/homework
#       Require valid-user
#     </Directory>
 Alias /images/ /linux/images/
 Alias /wav/ /linux/wavs/
 Alias /html40/ /linux/html40/
 Alias /css2.1/ /linux/css2.1/
 Alias /test/ /linux/temp/
 Alias /css/ /linux/css/
 Alias /sound/ /linux/sound/
 Alias /xhtml1/ /linux/xhtml1/
 Alias /LDP/ /mirror/ldp/
 Alias /video/ /linux/video/
 Alias /download/ /linux/downloads/
 Alias /flash/ /linux/flash/

# Begin Spam protection rules

RewriteCond %{HTTP_USER_AGENT} 
email.?(magnet|reaper|siphon|harvest|collect|wolf) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} floodgate [NC,OR]
RewriteCond %{HTTP_USER_AGENT} 
web(bandit|snake|collector|mole|miner|weasel) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} cherry.?picker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} extractor.?pro [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^crescent [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nicerspro [NC]
RewriteCond %{REQUEST_URI} !^/scripts/
RewriteRule .* /scripts/visions [PT]
ScriptAlias /scripts/ /linux/cgi-bin/sugarplum/poison
</VirtualHost>

I have about 15 other vhost files, all in a similar format (some 
simpler, some not).
- -- 
Wielder of the mighty +1 LARTsaber of Unsubscribe Instructions At End of
Message, the +3 Clue-by-Four of No Attachments to a Mailing List, and
the -4 Shield of No Spell Checker.
http://joseph-a-nagy-jr.homelinux.org http://mc-luug.homelinux.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/bJmlnjt9jEvKYeARArFvAJ9ynXXDyyewE4fUXe/LRertd0HdOwCePsjI
YgZ0un5qkHtznoTV2YFbaa8=
=5mzY
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message