ubuntu apache httpd

 

설치

sudo apt-get update
sudo apt-get install apache2

 

설정

설정 파일 경로

/etc/apache2/

가상 호스트

/etc/apache2/sites-enabled/000-default.conf

<VirtualHost *:80>
        ServerName ubuntu.example.com
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

 

module

/etc/apache2/conf-enabled/

재시작

service apache2 restart

 

log 경로

/var/log/apache2

tail -f /var/log/apache2/access.log