Binding a domain to a VPS can be divided into two stages:
- Apache setup;
- The direction of the domain to the server.
Apache configuration is to add the site settings in the <VirtualHost *:80> ... </VirtualHost> block with the DocumentRoot , ServerName and other necessary directives to the server configuration.
After adding the configuration - it needs to be checked. This is done with the apachectl configtest . The answer should be Syntax OK . In the case of syntax errors, it will be indicated in which line of which file they are.
If there are no errors, you need to restart Apache to apply the new settings. This can be done via apachectl restart , or, if the server is already servicing some sites, through apachectl graceful . In the second case, the web server will wait for the processing of current requests (and not terminate them) and apply the new configuration to new requests.
Domain forwarding to the server , in the case of using Yandex DNS, is performed according to this instruction. On the Yandex side, domain management is located at https://pdd.yandex.ru/ . The site requires an A record (specifying the server's IPv4 address) and, optionally, an AAAA record for the IPv6 address (of course, if available). On the domain registrar side, you must specify the following NS: dns1.yandex.net. and dns2.yandex.net. .
apachectl configtest. - MANKAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message Syntax OKissuedAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message Syntax OKAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message Syntax OK- Alex_01 amAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message Syntax OK