LoginSignup
6

More than 5 years have passed since last update.

posted at

updated at

apache2.confにNameVirtualHostを書いたらNameVirtualHost has no effect and will be removed in the next releaseと言われました

apacheでNameVirtualHostを使おうとしたら意味ないって言われました。環境はUbuntuです。

apacheのバージョンは

Apacheのバージョンは2.4.7です。

apacheのバージョンを確認
Server version: Apache/2.4.7 (Ubuntu)
Server built:   Jul 22 2014 14:36:38

NameVirtualHostを記述

バーチャルホストを使いたかったので、apache2.confにNameVirtualHostを記述しました。

apache2.confを編集
sudo vi /etc/apache2/apache2.conf

# 略

NameVirtualHost 3000

指定は80でないです。

apacheの起動でメッセージ

apacheを再起動しました。

apache2を起動でメッセージ
sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                                                         AH00548: NameVirtualHost has no effect and will be removed in the next release 

次のリリースでなくなるよって言われました。
どうやら今度からNameVirtualHostは書かなくても、VirtualHostが動くみたいです。
NameVirtualHostは消してもOK!!

参考

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
What you can do with signing up
6