LoginSignup
18
15

More than 5 years have passed since last update.

Apache2 on ubuntu で a2ensite すると does not exist と言われるときの対処法

Posted at

問題

Apache の設定ファイルを入れるディレクトリのひとつ
/etc/apache2/sites-available/
以下に、バーチャルホストの設定を書いた。
ファイル名は foobar としていた。
で、それを enable にしようとして

sudo a2ensite foobar

とやると、

ERROR: Site fopbar does not exist!

といって怒られる。

解決方法

a2ensite は 拡張子に .conf が無いといかんらしい。
つまり、
ファイル名を foobar --> foobar.conf にして、
同じく

sudo a2ensite foobar

を実行すると、はれて Enabling site foobar とか言われて成功。
あとは、メッセージ通り

sudo service apache2 reload

してあげれば OK.

18
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
15