I was looking for similar questions asked. But I did not find an answer to my question there. In ect/apache2 opened apache2.conf and apache2.conf this block there

 <VirtualHost IP:80> ServerAdmin webmaster@domain.name DocumentRoot /home/user/domain.name/public_html/public ServerName domain.name </VirtualHost> 

Removed errorlog and customlog for the customlog because of them was not started. The domain is currently being redefined. Now ip on the site comes. Question: no longer need to enter something else on the server? Address addresses or something else?

  • Tried to do what is written in the error? - andreymal
  • @andreymal googled error, did not find the exact answer. Someone says that the Apache with php7 is badly combined there and you need to install the mod under php7, someone says that you need to reinstall the Apache. I did not find the exact answer - Alex_01
  • Do you have a question how to bind a domain or apache by mistake? If you are interested in how to bind a domain, then in the domain specify the IP address of the server where Apache is located. If the question is in error, then run apachectl configtest . - MANK
  • @ Alex_01 you did not answer the question - tried to do what is written in the error? - andreymal
  • @MAN69K here is what the AH00558: 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 issued AH00558: 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 AH00558: 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 am AH00558: 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

1 answer 1

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. .