[ale] Re: Mapping VirtualHosts to public_html

Chuck Huber chuck at cehuber.org
Tue Jan 8 10:08:36 EST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christopher Fowler <cfowler at outpostsentinel.com> wrote:
|
| Is this the correct way?
|
| #
| # Use name-based virtual hosting.
| #
| NameVirtualHost *:80

Chris,

the <NameVirtualHost> tag belongs in /etc/httpd/conf/httpd.conf
Also be sure to include the following in the same file:

Include conf.d/*.conf

If you haven't already, create
/etc/httpd/conf.d/www.outpostsentinel.com.conf

In it place your virtual host tag
| <VirtualHost *:80>
|     DocumentRoot /home/outpostsentinel/public_html
|     ServerName www.outpostsentinel.com

and add the following lines *inside* the VirtualHost tag:

~        ServerAlias outpostsentinel.com
~        ErrorLog logs/outpostsentinel.com-error.log
~        CustomLog logs/outpostsentinel.com-access.log "combined"
~        ServerAdmin webmaster at outpostsentinel.com
~        LogLevel emerg

~        <Directory "/home/outpostsentinel.com/public.html">
~                Options Indexes
~                AllowOverride All
~        </Directory>
</VirtualHost>

In your DNS file (/var/named/outpostsentinel.com), be sure to include
the following lines:

www	A	placeIPAddressHere
	CNAME	www	

Enjoy,
~    - Chuck

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHg5HkiR3HaLbYCa4RAhxgAJ9dglVYyQ1nk4p4F5uSk7TZkXDqwwCg4qnc
/qRHVa/CLH7ALQ/Eonj0TsU=
=yScx
-----END PGP SIGNATURE-----



More information about the Ale mailing list