Ошибка Apache на ubuntu ERROR: Site (SiteName) does not exist
Я столкнулся с проблемой, когда я запускаю sudo a2ensite test.watermaps-eg.com.conf
для добавления нового сайта в apache2, он выдает мне ERROR: Site test.watermaps-eg.com does not exist!
Что я пытался сделать
Добавил файл test.watermaps-eg.com.conf
внутрь sites-enabled
.
Добавлены конфигурации apache2
внутри файла.
<VirtualHost *:80>
ServerName https://test.watermaps-eg.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@innoventiq.com
ServerName test.watermaps-eg.com
DocumentRoot /home/ubuntu/test_water_maps_django
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /static /home/ubuntu/test_water_maps_django/static
<Directory /home/ubuntu/test_water_maps_django/static>
Require all granted
Order Allow,Deny
Allow from all
AllowOverride all
</Directory>
<Directory /home/ubuntu/test_water_maps_django/kml_files>
Require all granted
</Directory>
<Directory /home/ubuntu/test_water_maps_django/water_maps>
Require all granted
Order Allow,Deny
Allow from all
AllowOverride all
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess test_water_maps_django python-path=/home/ubuntu/test_water_maps_django python-home=/home/ubuntu/test_water_maps_django/venv
WSGIProcessGroup test_water_maps_django
WSGIScriptAlias / /home/ubuntu/test_water_maps_django/water_maps/wsgi.py
WSGIPassAuthorization On
</VirtualHost>
Я выполнил команду sudo a2ensite test.watermaps-eg.com.conf
и она выдает вышеуказанную ошибку.
Возможно, вы захотите добавить файл conf (test.watermaps-eg.com.conf) внутри /etc/apache2/site-available. перед выполнением команды
sudo a2ensite test.watermaps-eg.com