LoginSignup
1
1

More than 5 years have passed since last update.

VirtualHostの設定

Posted at

VirtualHost

VirtualHostとは

1つのWEBサーバで複数のドメインのWEBサーバを運用すること

設定方法

/etc/httpd/conf/httpd.conf
# コメントアウトから外す VirtualHostを使いますよって意味です。
NameVirtualHost *:80

# 一番下に下記を追加する
<VirtualHost *:80>
    ServerName     www.adminweb.jp
    ServerAdmin    hogehoge@adminweb.jp
    DocumentRoot   "D:/Apache Group/Apache2.2/adminweb_docs"
    CustomLog      logs/adminweb.access.log common
    ErrorLog       logs/adminweb.error.log
</VirtualHost>

ServerName : 設定したいドメイン
ServerAdmin : 404などのエラーの際に管理者のメールアドレスを表示する
DocumentRoot : サイトのルートディレクトリ
CustomLog : アクセスログ
ErrorLog : エラーログ

Apachを再起動する

$ service httpd restart
1
1
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
1
1