S
S
Sieghardt Meisner2016-02-13 14:43:57
Apache HTTP Server
Sieghardt Meisner, 2016-02-13 14:43:57

Why did a2ensite only work on one host?

not so long ago I installed LAMP, and in Apache the jarga-land.ru subdomain without any problems, and everything functioned.
Now it became necessary to add another upload-good.test domain. I did
everything according to the instructions:
first, in the /etc/hosts file
127.0.0.1 localhost jarga-land.ru upload-good.test
, then in /etc/apache2/sites-enabled, I created the upload-good.test.conf file with the following content:

<VirtualHost *:80>
    ServerName upload-good.test
    DocumentRoot /var/www/upload-good.test
    <Directory /var/www/upload-good.test>
        AllowOverride All
    </Directory>
</VirtualHost>

Well, I created a folder in /var/www/upload-good.test, and index.php in it. Got an error
while executing the commandsudo a2ensite upload-good.test
ERROR: Site upload-good.test does not exist!

Maybe I missed something, but I've already tried it in different ways. The result is the same! How to fix this at all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Chudnovsky, 2016-02-13
@S1egh4rdt

You must not create files in /etc/apache2/sites-enabled !!! Soft links to files from /etc/apache2/sites-available are created there, and since there is no such file, therefore the a2ensite mechanism cannot work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question