|
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)
|
|
40.
|
|
|
You may also want your site to respond to www.ubunturocks.com, since many users will assume the www prefix is appropriate. Use the <emphasis>ServerAlias</emphasis> directive for this. You may also use wildcards in the ServerAlias directive.
|
|
|
|
Hasznos lehet úgy beállítani az oldalt, hogy a www.ubunturocks.com névre is válaszoljon, mivel sok felhasználó feltételezi, hogy a www előtag szükséges. Erre a célra a <emphasis>ServerAlias</emphasis> direktíva használható. A ServerAlias direktívában helyettesítő karaktereket is használhat.
|
|
Translated by
Gabor Kelemen
|
|
|
|
Located in
serverguide/C/web-servers.xml:250(para)
|
|
41.
|
|
|
For example, the following configuration will cause your site to respond to any domain request ending in <emphasis>.ubunturocks.com</emphasis>.
|
|
|
|
A következő beállítás hatására például a webhely minden <emphasis>.ubunturocks.com</emphasis> végű tartománykérésre válaszolni fog.
|
|
Translated by
Gabor Kelemen
|
|
|
|
Located in
serverguide/C/web-servers.xml:257(para)
|
|
42.
|
|
|
ServerAlias *.ubunturocks.com
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
ServerAlias *.ubunturocks.com
|
|
Translated by
Gabor Kelemen
|
|
|
|
Located in
serverguide/C/web-servers.xml:263(programlisting)
|
|
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:
|
|
|
|
Engedélyezze az új <emphasis>VirtualHostot</emphasis> az <application>a2ensite</application> segédprogram használatával, és indítsa újra az Apache2-t:
|
|
Translated by
Gabor Kelemen
|
|
|
|
Located in
serverguide/C/web-servers.xml:278(para)
|
|
45.
|
|
|
sudo a2ensite mynewsite
|
|
|
|
sudo a2ensite újoldal
|
|
Translated by
Gabor Kelemen
|
|
|
|
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.
|
|
|
|
Ne felejtsen el az <emphasis>újoldal</emphasis> helyett beszédesebb nevet adni a VirtualHostnak. Ennek egy módja, hogy a fájlt a virtuális kiszolgáló <emphasis>ServerName</emphasis> direktívája alapján nevezi el.
|
|
Translated by
Gabor Kelemen
|
|
|
|
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:
|
|
|
|
Hasonlóképpen az <application>a2dissite</application> segédprogrammal tilthatja le a webhelyeket. Ez a több virtuális kiszolgálót érintő beállítási hibák elhárításakor lehet hasznos.
|
|
Translated by
Gabor Kelemen
|
|
|
|
Located in
serverguide/C/web-servers.xml:296(para)
|