|
35.
|
|
|
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/mynewsite.conf
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:204(command)
|
|
39.
|
|
|
The <emphasis>ServerName</emphasis> directive is optional and specifies what FQDN your site should answer to. The default virtual host has no ServerName directive specified, so it will respond to all requests that do not match a ServerName directive in another virtual host. If you have just acquired the domain name ubunturocks.com and wish to host it on your Ubuntu server, the value of the ServerName directive in your virtual host configuration file should be ubunturocks.com. Add this directive to the new virtual host file you created earlier (<filename>/etc/apache2/sites-available/mynewsite.conf</filename>).
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:238(para)
|
|
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)
|
|
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)
|
|
54.
|
|
|
The <emphasis>ErrorDocument</emphasis> directive allows you to specify a file for Apache2 to use for specific error events. For example, if a user requests a resource that does not exist, a 404 error will occur. By default, Apache2 will simply return a HTTP 404 Return code. Read <filename>/etc/apache2/conf-available/localized-error-pages.conf</filename> for detailed instructions for using ErrorDocument, including locations of example files.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:350(para)
|
|
55.
|
|
|
By default, the server writes the transfer log to the file <filename>/var/log/apache2/access.log</filename>. You can change this on a per-site basis in your virtual host configuration files with the <emphasis>CustomLog</emphasis> directive, or omit it to accept the default, specified in <filename> /etc/apache2/conf-available/other-vhosts-access-log.conf</filename>. You may also specify the file to which errors are logged, via the <emphasis>ErrorLog</emphasis> directive, whose default is <filename>/var/log/apache2/error.log</filename>. These are kept separate from the transfer logs to aid in troubleshooting problems with your Apache2 server. You may also specify the <emphasis>LogLevel</emphasis> (the default value is "warn") and the <emphasis>LogFormat</emphasis> (see <filename> /etc/apache2/apache2.conf</filename> for the default value).
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:360(para)
|
|
57.
|
|
|
<Directory /var/www/html/mynewsite>
...
</Directory>
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:381(programlisting)
|
|
61.
|
|
|
<emphasis role="bold">Includes</emphasis> - Allow server-side includes. Server-side includes allow an HTML file to <emphasis> include</emphasis> other files. See <ulink url="https://help.ubuntu.com/community/ServerSideIncludes">Apache SSI documentation (Ubuntu community)</ulink> for more information.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:410(para)
|
|
65.
|
|
|
<emphasis role="bold">Multiview</emphasis> - Support content-negotiated multiviews; this option is disabled by default for security reasons. See the <ulink url="http://httpd.apache.org/docs/2.4/mod/mod_negotiation.html#multiviews">Apache2 documentation on this option</ulink>.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:441(para)
|
|
77.
|
|
|
You can install additional Apache2 modules and use them with your Web server. For example, run the following command at a terminal prompt to install the <emphasis>MySQL Authentication</emphasis> module:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:523(para)
|