| 1 |
# IP-based virtual host |
| 2 |
# http://httpd.apache.org/docs/2.2/vhosts/ip-based.html |
| 3 |
# |
| 4 |
# IP-based virtual hosts are used if you need every request to a certain |
| 5 |
# IP address and port to be served from the same website, regardless of |
| 6 |
# the domain name. |
| 7 |
|
| 8 |
# Unless you really need this, you should use name-based virtual hosts instead. |
| 9 |
|
| 10 |
# This file is here to serve as an example. You should copy it and make changes |
| 11 |
# to it before you use it. You can name the file anything you want, as long as |
| 12 |
# it ends in .conf |
| 13 |
# |
| 14 |
# To make management easier, we suggest using a seperate file for every virtual |
| 15 |
# host you have, and naming the files like so: 00_www.example.com.conf |
| 16 |
# This will allow you to easily make changes to certain virtual hosts without |
| 17 |
# having to search through every file to find where it's defined at. |
| 18 |
|
| 19 |
# This is where you set what IP address and port that this virtual host is for |
| 20 |
# Make sure that you have a Listen directive that will match this. |
| 21 |
<VirtualHost 1.2.3.4:80> |
| 22 |
|
| 23 |
# Used for creating URLs back to itself |
| 24 |
ServerName example.com |
| 25 |
|
| 26 |
# DocumentRoot is the location where your files will be stored |
| 27 |
# |
| 28 |
# For gentoo, the suggested structure is: |
| 29 |
# |
| 30 |
# /var/www/ |
| 31 |
# domain.com/ |
| 32 |
# htdocs/ Files for the website itself |
| 33 |
# htdocs-secure/ Files available via HTTPS (requires seperate config) |
| 34 |
# cgi-bin/ Site-specific executable scripts (optional) |
| 35 |
# error/ Custom error pages for the website (optional) |
| 36 |
# icons/ Custom icons for the website (optional) |
| 37 |
# |
| 38 |
# You should also set the vhost USE-flag so that you can install webapps |
| 39 |
# easily to multiple virtual hosts |
| 40 |
# |
| 41 |
# Note that if you put the directory anywhere other then under /var/www |
| 42 |
# you may run into problems with suexec and cgi scripts. |
| 43 |
# You can reconfigure this path by running suexec2-config |
| 44 |
# |
| 45 |
DocumentRoot "/var/www/example.com/htdocs" |
| 46 |
|
| 47 |
# This should match the DocumentRoot above |
| 48 |
<Directory "/var/www/example.com/htdocs"> |
| 49 |
|
| 50 |
# Some sane defaults - see httpd.conf for details |
| 51 |
Options Indexes FollowSymLinks |
| 52 |
AllowOverride None |
| 53 |
|
| 54 |
Order allow,deny |
| 55 |
Allow from all |
| 56 |
|
| 57 |
</Directory> |
| 58 |
|
| 59 |
# By default cgi-bin points to the global cgi-bin in /var/www/localhost |
| 60 |
# If you want site specific executable scripts, then uncomment this section |
| 61 |
# |
| 62 |
# If you have enabled suexec, you will want to make sure that the cgi-bin |
| 63 |
# directory is owned by the user and group specified with SuexecUserGroup |
| 64 |
|
| 65 |
#ScriptAlias /cgi-bin/ "/var/www/example.com/cgi-bin/" |
| 66 |
#<Directory "/var/www/example.com/cgi-bin"> |
| 67 |
# AllowOverride None |
| 68 |
# Options None |
| 69 |
# Order allow,deny |
| 70 |
# Allow from all |
| 71 |
#</Directory> |
| 72 |
|
| 73 |
# If you have multiple users on this system, each with their own vhost, |
| 74 |
# then it's a good idea to use suexec to seperate them. |
| 75 |
# |
| 76 |
# Set the user and group that scripts in this virtual host will run as. |
| 77 |
<IfDefine SUEXEC> |
| 78 |
SuexecUserGroup billybob users |
| 79 |
</IfDefine> |
| 80 |
|
| 81 |
# If you want custom error documents uncomment this section |
| 82 |
# See /etc/apache2/modules.d/00_error_documents.conf for the file |
| 83 |
# name to use for the various error types |
| 84 |
|
| 85 |
#<IfDefine ERRORDOCS> |
| 86 |
# Alias /error/ "/var/www/example.com/error/" |
| 87 |
# <Directory "/var/www/example.com/error/"> |
| 88 |
# AllowOverride None |
| 89 |
# Options IncludesNoExec |
| 90 |
# AddOutputFilter Includes html |
| 91 |
# AddHandler type-map var |
| 92 |
# Order allow,deny |
| 93 |
# Allow from all |
| 94 |
# </Directory> |
| 95 |
#</IfDefine ERRORDOCS> |
| 96 |
|
| 97 |
# If you want to use custom icons for the website autoindexes, |
| 98 |
# then uncomment this section. |
| 99 |
|
| 100 |
#Alias /icons/ "/var/www/example.com/icons/" |
| 101 |
#<Directory "/var/www/example.com/icons/"> |
| 102 |
# Options Indexes MultiViews |
| 103 |
# AllowOverride None |
| 104 |
# Order allow,deny |
| 105 |
# Allow from all |
| 106 |
#</Directory> |
| 107 |
|
| 108 |
# Create a logfile for this vhost |
| 109 |
CustomLog /var/log/apache2/example.com.log combined |
| 110 |
</VirtualHost> |
| 111 |
|
| 112 |
# vim: ts=4 filetype=apache |