Categories
木有技术

Apache 虚拟主机 ERROR: Site blog.dayandcarrot.net does not exist! a2ensite

今天在新的DigitalOcean下安装apache2,配置虚拟主机用于我的博客服务,然后根据
http://www.neoease.com/apache-virtual-host/
的内容进行配置,因为以前做过相同操作,所以一路轻车熟路~
结果运行a2ensite时,提示
ERROR: Site blog.dayandcarrot.net does not exist!
当时我的配置文件直接就是blog.dayandcarrot.net这个名字,以前也这么用的
然后我翻了下apache的配置文件apache2.conf,发现目录结构描述中有

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#	/etc/apache2/
#	|-- apache2.conf
#	|	`--  ports.conf
#	|-- mods-enabled
#	|	|-- *.load
#	|	`-- *.conf
#	|-- conf-enabled
#	|	`-- *.conf
# 	`-- sites-enabled
#	 	`-- *.conf

看到后缀都要是.conf的
然后我把文件名后加了个.conf的后缀,再
ensite blog.dayandcarrot.net
然后就搞定啦!~

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.