I
I
Iossarian2019-01-29 14:00:26
Apache HTTP Server
Iossarian, 2019-01-29 14:00:26

What is the error of creating a virtual host on ubuntu?

In order, I do the following:
1) Create the yiiblog folder in the /www directory
2) Create the yiiblog.ru.conf file in /sites-available with the following content:

<VirtualHost *:80>
        ServerName yiiblog
        DirectoryIndex index.php
        DocumentRoot /var/www/yiiblog/web/

        <Directory /var/www/yiiblog/web/>
                Options +FollowSymLinks +MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog /var/www/yiiblog/runtime/logyii2-app/runtime/logs/apache-error.log
        CustomLog /var/www/yiiblog/runtime/logs/apache-access.log combined
</VirtualHost>

3) In hosts 127.0.0.1 yiiblog.ru
4) I execute sudo a2ensite yiiblog.ru
5) I restart Apache, I get
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2- systemd.conf
Active: failed (Result: exit-code) since Tue 2019-01-29 12:56:23 EET; 10s ago
Process: 2072 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Jan 29 12:56:23 nikolay-VirtualBox apachectl[2072]: AH00112: Warning: DocumentRoot [/var/www/YiiBlog/web/] does not exist
Jan 29 12:56:23 nikolay-VirtualBox apachectl[2072]: AH00558 : apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'S
Jan 29 12:56:23 pm nikolay-VirtualBox apachectl[2072]: (2)No such file or directory: AH02291: Cannot access directory '/var/www/trainingYii/runtime/logyii2-app/runtime/log
Jan 29 12:56:23 nikolay-VirtualBox apachectl[2072]: (2)No such file or directory: AH02291: Cannot access directory '/var/www/trainingYii/runtime/logyii2-app/runtime/log
Jan 29 12: 56:23 nikolay-VirtualBox apachectl[2072]: AH00014: Configuration check failed
Jan 29 12:56:23 nikolay-VirtualBox apachectl[2072]: Action 'start' failed.
Jan 29 12:56:23 nikolay-VirtualBox apachectl[2072]: The Apache error log may have more information.
Jan 29 12:56:23 nikolay-VirtualBox systemd[1]: apache2.service: Control process exited, code=exited status=1
Jan 29 12:56:23 nikolay-VirtualBox systemd[1]: apache2.service: Failed with result 'exit-code'.
Jan 29 12:56:23 nikolay-VirtualBox systemd[1]: Failed to start The Apache HTTP Server.

Jan 29 12:56:23 pm nikolay-VirtualBox apachectl[2072]: AH00112: Warning: DocumentRoot [/var/www/YiiBlog/web/] does not exist Including I don't understand why YiiBlog , if I have it named in lowercase
What am I did it wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question