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