スポンサーリンク

いつも忘れるUbuntu14のApache設定ファイルの場所と設定項目のメモ

Apache
Sleeping panda

いつも設定ファイルの場所を忘れるのでメモ

設定ファイルの場所

/etc/apache2/
       |-apache2.conf
       |-ports.conf
       |-site-available/
                  |-000-default.conf
                  |-default-ssl.conf
       |-sites-enabled/
       |-conf-available/
       |-conf-enabled/
       |-mod-available/ ←MODのconfigファイル MPMの設定ファイルもこの中
       |-mod-enabled/
       |-envvars
       |-magic

VirtualHostの設定

vi /etc/apache2/sites-available/sub.example.com.conf


    ServerName sub.example.com
    ServerAdmin webmaster@localhost
    DocumentRoot  /var/www/html
    ErrorLog /var/log/apache2/sub.example.com.error.log
    CustomLog /var/log/apache2/sub.example.com.access.log combined
    LogLevel warn

有効化

$ sudo a2ensite sub.example.com.conf
↓
/etc/apache2/sites-enabledにsymlinkができる

再起動

sudo service apache2 restart

コメント

タイトルとURLをコピーしました