|
172.
|
|
|
The <emphasis>ErrorDocument</emphasis> directive allows you to specify a file for Apache to use for specific error events. For example, if a user requests a resource that does not exist, a 404 error will occur, and per Apache2's default configuration, the file <filename>/usr/share/apache2/error/HTTP_NOT_FOUND.html.var </filename> will be displayed. That file is not in the server's DocumentRoot, but there is an Alias directive in <filename>/etc/apache2/apache2.conf</filename> that redirects requests to the /error directory to /usr/share/apache2/error/. To see a list of the default ErrorDocument directives, use this command: <command>grep ErrorDocument /etc/apache2/apache2.conf</command>
|
|
|
|
Direktivet <emphasis>ErrorDocument</emphasis> låter dig specificera en fil åt Apache för att använda vid vissa felhändelser. Till exempel, om användaren efterfrågar en resurs som inte finns kommer ett 404-fel att uppstå, och enligt Apache2:s standardkonfiguration kommer filen <filename>/usr/share/apache2/error/HTTP_NOT_FOUND.html.var </filename> att visas. Den filen ligger inte i serverns DocumentRoot, men det finns ett Alias-direktiv i <filename>/etc/apache2/apache2.conf</filename> som vidarebefordrar förfrågningar till katalogen /error till /usr/share/apache2/error/. För att se en lista över standarddirektiven för ErrorDocument, använd det här kommandot: <command>grep ErrorDocument /etc/apache2/apache2.conf</command>
|
|
Translated by
Daniel Nylander
|
|
|
|
Located in
serverguide/C/web-servers.xml:215(para)
|
|
173.
|
|
|
By default, the server writes the transfer log to the file /var/log/apache2/access.log. 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/apache2.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).
|
|
|
|
Servern loggar normalt alla överföringar till filen /var/log/apache2/access.log. Du kan ändra det här för varje webbplats i dina konfigurationsfiler för virtuella värdar med direktivet <emphasis>CustomLog</emphasis>, eller hoppa över det för att acceptera standardvärdet som bestäms i <filename> /etc/apache2/apache2.conf</filename>. Du kan också välja vilken fil felmeddelanden skall loggas till med direktivet <emphasis>ErrorLog</emphasis>. Standardplatsen för felmeddelanden är <filename>/var/log/apache2/error.log</filename>. De här sparas separat från överföringsloggarna för att underlätta felsökning av din Apache2-server. Du kan också välja <emphasis>LogLevel</emphasis> (standardvärdet är "warn") och <emphasis>LogFormat</emphasis> (se <filename> /etc/apache2/apache2.conf</filename> för standardvärdet).
|
|
Translated by
Daniel Nylander
|
|
|
|
Located in
serverguide/C/web-servers.xml:233(para)
|
|
174.
|
|
|
Some options are specified on a per-directory basis rather than per-server. Option is one of these directives. A Directory stanza is enclosed in XML-like tags, like so:
|
|
|
|
Vissa alternativ är specificerade med utgångspunkt av en per-katalog snarare än per-server. Alternativ är en av dessa direktiv. Ett katalogblock omfattas av XML-liknande taggar, liksom:
|
|
Translated and reviewed by
Daniel Nylander
|
|
|
|
175.
|
|
|
<Directory /var/www/mynewsite> ... </Directory>
|
|
|
|
<Directory /var/www/mynewsite> ... </Directory>
|
|
Translated and reviewed by
Daniel Nylander
|
|
|
|
176.
|
|
|
The Options directive within a Directory stanza accepts one or more of the following values (among others), separated by spaces:
|
|
|
|
Options-direktivet i ett katalogblock accepterar en eller fler av följande värden (bland annat), separerade av mellanslag:
|
|
Translated and reviewed by
Daniel Nylander
|
|
|
|
Located in
serverguide/C/web-servers.xml:259(para)
|
|
177.
|
|
|
Most files should not be executed as CGI scripts. This would be very dangerous. CGI scripts should kept in a directory separate from and outside your DocumentRoot, and only this directory should have the ExecCGI option set. This is the default, and the default location for CGI scripts is /usr/lib/cgi-bin.
|
|
|
|
De flesta filerna bör inte exekveras som CGI-skript. Det skulle vara väldigt farligt. CGI-skript bör ligga i en egen katalog som är skild från, och utanför, din DocumentRoot, och bara den här katalogen skall ha ExecCGI-alternativet aktiverat. Såhär ser standardinställningen ut, och standardplatsen för CGI-skript är /usr/lib/cgi-bin.
|
|
Translated by
Daniel Nylander
|
|
|
|
Located in
serverguide/C/web-servers.xml:268(para)
|
|
178.
|
|
|
<emphasis role="bold">ExecCGI</emphasis> - Allow execution of CGI scripts. CGI scripts are not executed if this option is not chosen. <placeholder-1/>
|
|
|
|
<emphasis role="bold">ExecCGI</emphasis> - Tillåt att CGI-skript körs. CGI-skript körs inte om inte det inte skrivs. <placeholder-1/>
|
|
Translated and reviewed by
Robin Sonefors
|
Shared: |
|
<emphasis role="bold">ExecCGI</emphasis> - Tillåt att CGI-skript körs. CGI-skript körs inte om inte detta alternativ är valt. <placeholder-1/>
|
|
|
Suggested by
Håkan Hagman
|
|
|
|
Located in
serverguide/C/web-servers.xml:389(para)
|
|
179.
|
|
|
<emphasis role="bold">Includes</emphasis> - Allow server-side includes. Server-side includes allow an HTML file to <emphasis> include</emphasis> other files. This is not a common option. See <ulink url="http://httpd.apache.org/docs/2.2/howto/ssi.html">the Apache2 SSI Howto</ulink> for more information.
|
|
|
|
<emphasis role="bold">Includes</emphasis> - Tillåter inkluderingar på server-sidan. Inkluderingar på server-sidan tillåter att en HTML-fil <emphasis> inkluderar</emphasis> andra filer. Detta är inget vanligt allternativ. Se <ulink url="http://httpd.apache.org/docs/2.2/howto/ssi.html">the Apache2 SSI Howto</ulink> för mer information.
|
|
Translated and reviewed by
Håkan Hagman
|
|
|
|
180.
|
|
|
<emphasis role="bold">IncludesNOEXEC</emphasis> - Allow server-side includes, but disable the #exec and #include commands in CGI scripts.
|
|
|
|
<emphasis role="bold">IncludesNOEXEC</emphasis> - Tillåter serverinkluderingar, men avaktiverar kommandona #exec och #include i CGI-skript.
|
|
Translated and reviewed by
Robin Sonefors
|
|
|
|
Located in
serverguide/C/web-servers.xml:284(para)
|
|
181.
|
|
|
For security reasons, this should usually not be set, and certainly should not be set on your DocumentRoot directory. Enable this option carefully on a per-directory basis only if you are certain you want users to see the entire contents of the directory.
|
|
|
|
Av säkerhetsskäl är det här oftast inte aktiverat, och bör framförallt inte vara aktiverat i din DocumentRoot-katalog. Aktivera det här valet försiktigt, och bara för de kataloger där du vet att användarna vill se hela innehållet i katalogen.
|
|
Translated and reviewed by
Robin Sonefors
|
Shared: |
|
Av säkerhetsskäl skall vanligtvis inte detta vara aktiverat, och bör framförallt inte vara aktiverat i din DocumentRoot-katalog. Vaf försiktig om du aktivera det här alternativet, och bara för de kataloger där du med säkerhet vet att användarna vill se hela innehållet i katalogen.
|
|
|
Suggested by
Håkan Hagman
|
|
|
|
Located in
serverguide/C/web-servers.xml:426(para)
|