Re: Apache (was Apace) Redirect Question
Wolf, thank you very much for graciously providing the examples. I will
study this to gain an understanding, and I will let you know how it goes.
Craig
> Here are the settings for one of my multisite servers.
> I am using Apache2.2 on Debian Squeeze with the backports repo enabled
> - thus it is not a stock Squeeze install
> This is even simpler than I thought I would be giving you as the
> NameVirtualHost directive is in conf.d/virtual.conf
> If you notice, the apache2.conf file has only the generic server info
> and all of the specific user configs are in other places.
> It handles the "did they type www. or not in the virtual config as a
> server alias. This is not a redirect, which would add details to the
> url, like you get when you type http://evergreen.lyrasistechnology.org
> into the address bar, because these 2 directories are simply not
> shared.
> The evergreen address is pointed at a directory outside of /var/www
> and can be shared by multiple clients and the search scope is
> different in each.
> ** You may get a warning when you restart apache with this setup
> because default-ssl is listening on port 443 - the complaint will be
> that apache does not like mixing virtual servers with port numbers and
> others without. I haven't had to restart this setup for months, so I
> don't remember the exact warning message.
>
> -Wolf
>
>
> #=======snippet from apache2.conf
>
> # Include generic snippets of statements
> Include conf.d/
>
>
>
> #=======Contents of conf.d directory=======================
> wolf@SERVER-01:/etc/apache2/conf.d$ ls
> charset localized-error-pages other-vhosts-access-log security virtual.conf
>
>
> #=======Configuration of virtual.conf=======================
>
> wolf@SERVER-01:/etc/apache2/conf.d$ cat virtual.conf
> # running virtual hosts
> #
> NameVirtualHost *
>
> #======Contents of the sites-available directory============
>
> wolf@SERVER-01:/etc/apache2/sites-available$ ls
> default default-ssl legacy
>
> #======Configuration for dev.example.net====================
>
> wolf@SERVER-01:/etc/apache2/sites-available$ cat default
> <VirtualHost *>
> ServerAdmin wolf.halton@lyrasis.org
> ServerName dev.example.net
> ServerAlias www.dev.example.net
>
> DocumentRoot /var/www/http/
> <Directory />
> Options FollowSymLinks
> AllowOverride All
> </Directory>
> <Directory /var/www/http/>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> allow from all
> </Directory>
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <Directory "/usr/lib/cgi-bin">
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>
>
> ErrorLog /var/log/apache2/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog /var/log/apache2/access.log combined
>
> Alias /doc/ "/usr/share/doc/"
> <Directory "/usr/share/doc/">
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> </Directory>
>
> </VirtualHost>
>
> #========Configuration for legacy.example.net======================
> wolf@SERVER-01:/etc/apache2/sites-available$ cat legacy
> # This is the settings file for the legacy.example.net site
>
> <VirtualHost *>
> ServerAdmin wolf.halton@lyrasis.org
> ServerName www.legacy.example.net
> ServerAlias legacy.example.net
>
> # Indexes + Directory Root.
> DirectoryIndex index.html
> DocumentRoot /var/www/legacy/htdocs/
>
> # CGI Directory
> ScriptAlias /cgi-bin/ /var/www/legacy/cgi-bin/
> <Location /cgi-bin>
> Options +ExecCGI
> </Location>
>
>
> # Logfiles
> ErrorLog /var/www/legacy/logs/error.log
> CustomLog /var/www/legacy/logs/access.log combined
> </VirtualHost>
>
>
> --
> This Apt Has Super Cow Powers - http://sourcefreedom.com
> Open-Source Software in Libraries - http://FOSS4Lib.org
> Advancing Libraries Together - http://LYRASIS.org
> Apache Open Office Developer wolfhalton@apache.org
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive:
> [🔎] CALRLYEmYvqzFFSidNhv5V+ka0YQr7A-6FK3u-=S0APh1-0KrpA@mail.gmail.com">http://lists.debian.org/[🔎] CALRLYEmYvqzFFSidNhv5V+ka0YQr7A-6FK3u-=S0APh1-0KrpA@mail.gmail.com
>
>
Sent - Gtek Web Mail
Reply to: