Utrzymuję ten błąd po uruchomieniu polecenia

# sudo apache2ctl configtest

    [Wed Mar 18 15:19:09.134018 2020] [core:error] [pid 10656:tid 140336746033216] (EAI 2)Name or service not known: AH00547: Could not resolve host name www.toutic.com: -- ignoring!
    AH00526: Syntax error on line 1 of /etc/apache2/sites-enabled/toutic.com.conf:
    Missing address for VirtualHost
    Action 'configtest' failed.
    The Apache error log may have more information.

Oto plik /etc/apache2/sites-ENabled/toutic.com.conf Plik:

<VirtualHost *: 80>
    ServerAdmin admin@toutic.com
    ServerName toutic.com
    ServerAlias www.toutic.com
    DocumentRoot /var/www/toutic.com/public_html
    ErrorLog ${APACHE_LOG_DIR
}/error.log
    CustomLog ${APACHE_LOG_DIR
}/access.log combined
</VirtualHost>

Oto kroki, których podążyłem: https://www.digitalocean.com/community/Tutorials/how-to-install-the-apache-web-server-on-debian-9

0
Abdelghafour Ennahid 18 marzec 2020, 18:25

1 odpowiedź

Najlepsza odpowiedź

Usuń wszystko i spróbuj tak:

<VirtualHost *:80>
        ServerName toutic.com
        ServerAlias www.toutic.com
        DocumentRoot /var/www/toutic.com/public_html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
2
leo95batista 18 marzec 2020, 15:38