當我運行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 [email protected]
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,它回傳了上述錯誤。
uj5u.com熱心網友回復:
在運行命令之前,您可能希望在 /etc/apache2/ site-available中添加 conf (test.watermaps-eg.com.conf) 檔案
sudo a2ensite test.watermaps-eg.com
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/494286.html
上一篇:org.springframework.dao.IncorrectResultSizeDataAccessExceptionMongoLimit不起作用?
