오래전 이야기/Server

FreeBSD에 apache설치

리눅스 엔지니어였던 2008. 9. 15. 13:24
# FreeBSD에 apache 설치

cd /usr/ports/www/apache2
 
make APACHE_PERF_TUNING=YES all install
 
cd /usr/local/etc/apache2
 
vi httpd.conf
 
ServerName, ServerAdmin 변경
 
cd /usr/local/sbin
 
./httpd -t
 
./apachectl start
 
vi /var/log/httpd-error.log
 
....
[Wed Dec 29 20:08:21 2004] [alert] (EAI 7)No address associated with hostname: mod_unique_id: unable to find IPv4 address of "bsdtes
t"
Configuration Failed
....
 
vi /usr/local/etc/apache2/httpd.conf
 
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_module libexec/apache2/mod_access.so
LoadModule auth_module libexec/apache2/mod_auth.so
LoadModule auth_anon_module libexec/apache2/mod_auth_anon.so
LoadModule auth_dbm_module libexec/apache2/mod_auth_dbm.so
#LoadModule auth_digest_module libexec/apache2/mod_auth_digest.so   
#LoadModule file_cache_module libexec/apache2/mod_file_cache.so
LoadModule charset_lite_module libexec/apache2/mod_charset_lite.so
#LoadModule cache_module libexec/apache2/mod_cache.so
#LoadModule disk_cache_module libexec/apache2/mod_disk_cache.so
LoadModule include_module libexec/apache2/mod_include.so
LoadModule deflate_module libexec/apache2/mod_deflate.so
LoadModule log_config_module libexec/apache2/mod_log_config.so
LoadModule logio_module libexec/apache2/mod_logio.so
LoadModule env_module libexec/apache2/mod_env.so
LoadModule mime_magic_module libexec/apache2/mod_mime_magic.so
LoadModule cern_meta_module libexec/apache2/mod_cern_meta.so
LoadModule expires_module libexec/apache2/mod_expires.so
LoadModule headers_module libexec/apache2/mod_headers.so
LoadModule usertrack_module libexec/apache2/mod_usertrack.so
#LoadModule unique_id_module libexec/apache2/mod_unique_id.so    ==> 주석 처리
LoadModule setenvif_module libexec/apache2/mod_setenvif.so
 
/usr/local/sbin/apachctl start                                
                            
ps -aux |grep httpd               ==> start명령을 내려도 아무런 응답이 없기때문에 꼭 확인.
www   27101  0.0  2.3  5236 2820  ??  I     8:31PM   0:00.00 /usr/local/sbin/httpd -k start
www   27100  0.0  2.3  5236 2820  ??  I     8:31PM   0:00.00 /usr/local/sbin/httpd -k start
www   27099  0.0  2.3  5236 2820  ??  I     8:31PM   0:00.00 /usr/local/sbin/httpd -k start
www   27095  0.0  2.2  5236 2784  ??  I     8:30PM   0:00.00 /usr/local/sbin/httpd -k start
www   27094  0.0  2.2  5236 2784  ??  I     8:30PM   0:00.00 /usr/local/sbin/httpd -k start
www   27093  0.0  2.2  5236 2784  ??  I     8:30PM   0:00.00 /usr/local/sbin/httpd -k start
www   27092  0.0  2.3  5260 2824  ??  I     8:30PM   0:00.01 /usr/local/sbin/httpd -k start
www   27091  0.0  2.3  5268 2832  ??  I     8:30PM   0:00.01 /usr/local/sbin/httpd -k start
root  27090  0.0  2.2  5220 2788  ??  Ss    8:30PM   0:00.04 /usr/local/sbin/httpd -k start
 
http://IP 확인.