|
314.
|
|
|
The <emphasis>DocumentRoot</emphasis> directive specifies where Apache2 should look for the files that make up the site. The default value is /var/www. No site is configured there, but if you uncomment the <emphasis>RedirectMatch</emphasis> directive in <filename>/etc/apache2/apache2.conf</filename> requests will be redirected to /var/www/apache2-default where the default Apache2 site awaits. Change this value in your site's virtual host file, and remember to create that directory if necessary!
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:242(para)
|
|
315.
|
|
|
The /etc/apache2/sites-available directory is <emphasis role="bold"> not</emphasis> parsed by Apache2. Symbolic links in /etc/apache2/sites-enabled point to "available" sites.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:254(para)
|
|
316.
|
|
|
Enable the new <emphasis>VirtualHost</emphasis> using the <application>a2ensite</application> utility and restart Apache2:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:260(para)
|
|
317.
|
|
|
sudo a2ensite mynewsite
|
|
|
|
sudo a2ensite mynewsite
|
|
Translated and reviewed by
Xandru Martino
|
|
|
|
Located in
serverguide/C/web-servers.xml:266(command)
|
|
318.
|
|
|
sudo /etc/init.d/apache2 restart
|
|
|
|
sudo /etc/init.d/apache2 restart
|
|
Translated and reviewed by
Xandru Martino
|
|
|
|
Located in
serverguide/C/web-servers.xml:267(command) serverguide/C/web-servers.xml:285(command) serverguide/C/web-servers.xml:538(command) serverguide/C/web-servers.xml:547(command) serverguide/C/web-servers.xml:606(command) serverguide/C/mail.xml:932(command) serverguide/C/lamp-applications.xml:228(command)
|
|
319.
|
|
|
Be sure to replace <emphasis>mynewsite</emphasis> with a more descriptive name for the VirtualHost. One method is to name the file after the <emphasis>ServerName</emphasis> directive of the VirtualHost.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:271(para)
|
|
320.
|
|
|
Similarly, use the <application>a2dissite</application> utility to disable sites. This is can be useful when troubleshooting configuration problems with multiple VirtualHosts:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:278(para)
|
|
321.
|
|
|
sudo a2dissite mynewsite
|
|
|
|
sudo a2dissite mynewsite
|
|
Translated and reviewed by
Xandru Martino
|
|
|
|
Located in
serverguide/C/web-servers.xml:284(command)
|
|
322.
|
|
|
Default Settings
|
|
|
|
Configuración predeterminada
|
|
Translated and reviewed by
Xandru Martino
|
|
|
|
Located in
serverguide/C/web-servers.xml:290(title)
|
|
323.
|
|
|
This section explains configuration of the Apache2 server default settings. For example, if you add a virtual host, the settings you configure for the virtual host take precedence for that virtual host. For a directive not defined within the virtual host settings, the default value is used.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:292(para)
|