[aklug] Re: Apache virtual host configuration

From: barsalou <barjunk@attglobal.net>
Date: Tue Aug 19 2008 - 08:19:58 AKDT

Good stuff Richard! Thanks for posting that.

Mike B.

Quoting Richard Moore <dewey.moore@gmail.com>:

> first question about ubuntu Server, is apache installed the same way as it
> is in debian. second are the host files all seperate in the
> /etc/apache2/sites-enabled/<vhostfile>
> if so you just make a new file, but remember whatever file is higher in th=
e
> abc naming convention, that file will be read as the default. so you want
> your main site file to be 001-domain1.com, the second file would look like
> 002-domain2.com etc...
>
> 001-vendor.museumtour.com 101-webmail.museumtour.com
> 002-nagios.museumtour.com 102-webmailproto.museumtour.com
> 003-graphs.museumtour.com 103-graphs.museumtour.com
> 004-webmail.museumtour.com 105-group.museumtour.com
> 005-group.museumtour.com
>
> this is my /etc/apache2/sites-enabled/ dir for one of our servers that hav=
e
> sites on them.. the ones that start with 00 are the insecure sites the htt=
p
> protocol. the sites start with 101 are the secure sites that are the https
> protocol.
>
> inside the file you need something similar to this..
>
> <VirtualHost *:80>
>
> ##servers email address
> ServerAdmin customerservice@museumtour.com
> ServerName www.museumtour.com
> ServerAlias museumtour.com
>
> DocumentRoot /sites/museumtour.com/www/
>
> #this keeps people out of any directory accept the
> #the main documentroot
> <Directory />
> Options -FollowSymLinks
> AllowOverride None
> Order allow,deny
> Deny from all
> </Directory>
>
> ##this is permissions for the main direcory
> <Directory /sites/museumtour.com/www/>
> Options ExecCGI
> AllowOverride None
> Order allow,deny
> allow from all
> </Directory>
>
> #added to keep people outside the network to
> #look at the php information
> <Files phpinfo.php>
> Order deny,allow
> Deny from all
> Allow from 192.168
> </Files>
>
> #script configs
> 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>
>
> ##custom log files
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
> ned
> CustomLog /logs/museumtour.com/access.log combined env=3D!dontlog
>
> ServerSignature On
>
> ##custom error pages
> ErrorDocument 400 /page_not_found.php
> ErrorDocument 401 /page_not_found.php
> ErrorDocument 403 /page_not_found.php
> ErrorDocument 404 /page_not_found.php
> ErrorDocument 500 /page_not_found.php
>
> </VirtualHost>
>
>
> as far as making them work with php, cgi-bin, and shtml, and any other, yo=
u
> need to install all the stuff that goes along with it,
>
> to install apache2, making it work with php5, the command would be somethi=
ng
> like
> sudo apt-get install apache2 php5 libapache2-mod-php5 --- if you want
> anything else that goes with php5 just sudo apt-cache search php5.. that
> will give you all the stuff that goes along with php5 such as php5-gd
> php5-mhash php5-mysql etc...
>
> you can google cgi-bin scripts, I do not use them, I use all php with all
> webpages and scripts..
>
> Hope this helps you, let me know
>
> Richard
>
>
>
> On Mon, Aug 18, 2008 at 3:25 PM, Christopher Howard =20
> <choward@indicium.us>wrote:
>
>> Hi. I'm trying to set up Ubuntu Server 7.10 inside a QEMU VM. It's
>> main purpose is to be a testing web-server, where I'll test html, shtml
>> and scripts and then rsync them to my main website.
>>
>> However, it is my first time ever trying to configure Apache. (It's
>> been a fun ride, let me tell you...) Would one of you kind people be
>> willing to send me a copy of one of your Virtualhost configurations?
>> There are a few things that are of concern to me in how I set my server u=
p:
>> 1. It should be able to execute scripts in the cgi-bin.
>> 2. It should recognize SHTML.
>> 3. It should be able to use those 'include' directives inside SHTML to
>> include script output.
>> 4. It should be able to default to an 'index.shtml' file at the webroot
>> if the client does not specify a specific document in that directory.
>>
>> Number one is the only thing I'm sure I've been able to get working
>> correctly. As for two and three, I found the appropriate instructions
>> in the Apache documentation, but it still doesn't seem to be working for
>> me. It would really help if I had working examples that incorporated
>> some of these things.
>>
>> (And, in case you're wondering, I did try to check to see what the
>> config files were like on the web server for my site. But there it is a
>> shared server environment, so I didn't have access to that kind of info.)
>>
>> Thank you,
>> choward@indicium.us
>>
>> ---------
>> To unsubscribe, send email to <aklug-request@aklug.org>
>> with 'unsubscribe' in the message body.
>>
>>
>
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Tue Aug 19 08:20:13 2008

This archive was generated by hypermail 2.1.8 : Tue Aug 19 2008 - 08:20:13 AKDT