|
297.
|
|
|
<emphasis>sites-enabled:</emphasis> like mods-enabled, <filename role="directory">sites-enabled</filename> contains symlinks to the <filename>/etc/apache2/sites-available</filename> directory. Similarly when a configuration file in sites-available is symlinked it will be active once Apache is restarted.
|
|
|
|
(no translation yet)
|
|
|
|
298.
|
|
|
In addition, other configuration files may be added using the <emphasis>Include</emphasis> directive, and wildcards can be used to include many configuration files. Any directive may be placed in any of these configuration files. Changes to the main configuration files are only recognized by Apache2 when it is started or restarted.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:127(para)
|
|
299.
|
|
|
The server also reads a file containing mime document types; the filename is set by the <emphasis>TypesConfig</emphasis> directive, and is <filename>/etc/mime.types</filename> by default.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:136(para)
|
|
300.
|
|
|
Basic Settings
|
|
|
|
การตั้งค่าพื้นฐาน
|
|
Translated and reviewed by
Sukit Arseanrapoj
|
|
|
|
Located in
serverguide/C/web-servers.xml:141(title)
|
|
301.
|
|
|
This section explains Apache2 server essential configuration parameters. Refer to the <ulink url="http://httpd.apache.org/docs/2.2/">Apache2 Documentation</ulink> for more details.
|
|
|
|
ในส่วนนี้จะอธิบายถึงการตั้งค่าพื้นฐานต่างๆ กรุณาอ่าน <ulink url="http://httpd.apache.org/docs/2.2/">คู่มือการใช้งาน Apache2</ulink> สำหรับรายละเอียดเพิ่มเติม
|
|
Translated and reviewed by
Sukit Arseanrapoj
|
|
|
|
Located in
serverguide/C/web-servers.xml:142(para)
|
|
302.
|
|
|
Apache2 ships with a virtual-host-friendly default configuration. That is, it is configured with a single default virtual host (using the <emphasis>VirtualHost</emphasis> directive) which can modified or used as-is if you have a single site, or used as a template for additional virtual hosts if you have multiple sites. If left alone, the default virtual host will serve as your default site, or the site users will see if the URL they enter does not match the <emphasis>ServerName</emphasis> directive of any of your custom sites. To modify the default virtual host, edit the file <filename>/etc/apache2/sites-available/default</filename>.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:150(para)
|
|
303.
|
|
|
The directives set for a virtual host only apply to that particular virtual host. If a directive is set server-wide and not defined within the virtual host settings, the default setting is used. For example, you can define a Webmaster email address and not define individual email addresses for each virtual host.
|
|
|
|
การตั้งค่าของโฮสต์เสมือนอันใดอันหนึ่งจะมีผลเฉพาะกับโฮสต์เสมือนนั้นเท่านั้น และจะไม่กระทบกับโฮสต์เสมือนอื่นๆ แต่ถ้าคุณตั้งค่าใดที่มีผลสำหรับทั้งเซิร์ฟเวอร์และไม่ได้ตั้งค่าอื่นๆสำหรับโฮสต์เสมือน ค่าที่คุณตั้งไว้ในระดับเซิร์ฟเวอร์จะมีผลบังคับใช้แทน เช่นคุณสามารถตั้งค่าอีเมล์ของผู้ดูแลเว็บในระดับเซิร์ฟเวอร์แทนที่จะต้องตั้งค่านี้ในทุกๆโฮสต์เสมือนได้
|
|
Translated and reviewed by
Sukit Arseanrapoj
|
|
|
|
Located in
serverguide/C/web-servers.xml:163(para)
|
|
304.
|
|
|
If you wish to configure a new virtual host or site, copy that file into the same directory with a name you choose. For example:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:171(para)
|
|
305.
|
|
|
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mynewsite
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:177(command)
|
|
306.
|
|
|
Edit the new file to configure the new site using some of the directives described below.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/web-servers.xml:180(para)
|