|
43.
|
|
|
The <emphasis>DocumentRoot</emphasis> directive specifies where Apache2 should look for the files that make up the site. The default value is /var/www/html, as specified in <filename>/etc/apache2/sites-available/000-default.conf</filename>. If desired, 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:269(para)
|
|
44.
|
|
|
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:278(para)
|
|
45.
|
|
|
sudo a2ensite mynewsite
|
|
|
|
sudo a2ensite moja-nova-stran
|
|
Translated by
Klemen Košir
|
|
|
|
Located in
serverguide/C/web-servers.xml:284(command)
|
|
46.
|
|
|
sudo systemctl restart apache2.service
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:285(command) serverguide/C/web-servers.xml:303(command) serverguide/C/web-servers.xml:544(command) serverguide/C/web-servers.xml:553(command) serverguide/C/web-servers.xml:612(command) serverguide/C/mail.xml:994(command) serverguide/C/lamp-applications.xml:238(command) serverguide/C/lamp-applications.xml:462(command)
|
|
47.
|
|
|
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:289(para)
|
|
48.
|
|
|
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:296(para)
|
|
49.
|
|
|
sudo a2dissite mynewsite
|
|
|
|
sudo a2dissite moja-nova-stran
|
|
Translated by
Klemen Košir
|
|
|
|
Located in
serverguide/C/web-servers.xml:302(command)
|
|
50.
|
|
|
Default Settings
|
|
|
|
Privzete nastavitve
|
|
Translated by
Klemen Košir
|
|
|
|
Located in
serverguide/C/web-servers.xml:308(title)
|
|
51.
|
|
|
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:310(para)
|
|
52.
|
|
|
The <emphasis>DirectoryIndex</emphasis> is the default page served by the server when a user requests an index of a directory by specifying a forward slash (/) at the end of the directory name.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:322(para)
|