The DocumentRoot line specifies where the Web documents for this site are stored. If you plan
to have more than one site per user, you will need to modify this layout appropriately. Replace
username with the name of the account that is administrating the Web site. For this example, each
Web site is required to be administered by a different user account.
The User and Group lines are used by suexec to determine which account to run scripts as. The
groupname parameter should be changed to username??™s primary group. In most modern installations,
this is the same as the username. These two lines must be left out if you aren??™t using suexec.
When you are done, use apachectl to check the configuration and then do a graceful restart:
# apachectl configtest
Syntax OK
# apachectl graceful
Unless you have already created it, you will receive a warning about public_html not
existing. Run mkdir ~/public_html as the user that owns the Web site in order to
create it.
NOTE
658
Running Servers Part V
Additional virtual hosts can be added by repeating the VirtualHost block and repeating the configuration
test (configtest) and reload (graceful) steps.
You may want to place individual virtual hosts in separate files for convenience. However,
you should be careful to keep your primary virtual host in a file that will be read before
the others, because the first virtual host receives requests for site names that don??™t match any in your
configuration.
Pages:
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217