open:apache

Apache

아파치 실행 확인

apachectl status

아파치 실행

apachectl start

설정 파일 변경

/etc/httpd/conf/httpd.conf

설치 : yum -y install httpd

httpd : /usr/sbin/httpd

apachectl : /usr/sbin/apachectl

conf : /etc/httpd/conf/httpd.conf

conf /etc/httpd/conf
/var/www/html
로그 /etc/httpd/logs
pid-file /etc/httpd/run/httpd.pid
apachectl start
httpd start
apachectl stop
httpd stop
apachectl restart
httpd restart
아파치 시작
/etc/rc.d/init.d/httpd start
아파치 중지
/etc/rc.d/init.d/httpd stop
아파치 리스타트
/etc/rc.d/init.d/httpd restart
apachectl status
/etc/init.d/httpd
/sbin/service httpd
/usr/sbin/apachectl
service httpd start
curl 127.0.0.1
ps -ef | grep httpd
sudo service apache2 status
sudo netstat -lntp | grep apache2
find / -name apachectl
/usr/local/apache/bin/httpd -v
-D name <IfDefine name> 지시자에 사용되는 이름을 정의함
-d directory 아파치실행시에 아파치의 Root 경로를 따로 지정해 줄 수 있음
-f file 아파치 설정파일을 직접 지정해 줄 수 있음
-C “directive” 아파치 설정파일을 읽기 의 process directive
-c “directive” 아파치 설정파일을 읽은 의 process directive
-v 아파치의 버전을 보여줌
-V 컴파일시 사용했던 옵션을 보여줌
-h httpd 실행시 사용할 수 있는 옵션들의 도움말을 보여줌
-l 컴파일시에 사용했던 모듈들을 보여줌
-L 설정가능한 지시자를 보여줌
-S 설정되어있는 가상호스트를 보여줌
-t 설정파일(httpd.conf)파일의 문법적인 체크를 할 수 있음
-T DocumentRoot 항목체크는 제외하고 설정파일의 문법적인 테스트함

기존에 설치되어 있는 아파치에 모듈 추가 설치하기

  1. 아파치 소스 디렉토리로 이동 (없는 경우 동일 버전 다운로드 후 압축해제)
  2. 아래 명령으로 설치를 원하는 모듈의 소스 파일을 검색한다.

    find . -name “모듈이름”

  3. 아래 명령 실행

    {아파치 설치디렉토리}/bin/apxs -iax {2번에서 찾은 모듈경로}/모듈이름.c

  4. {아파치 설치디렉토리}/modules에 모듈이 추가 되어 있을 것이다.
  5. {아파치 설치디렉토리}/conf/httpd.conf 에 해당 모듈이 로딩하는 설정이 추가되어 있을 것이다.
  6. 각 모듈의 세부 설정을 추가한다.
  7. 아파치 재시작

    {아파치 설치디렉토리}/bin/apachectl restart

    또는

    {아파치 설치디렉토리}/bin/apachectl graceful

설치 과정

  1. FTP로 파일 전송
  2. 압축 풀고 (어디에?)

apxs 파일이 /usr/sbin 에 위치함

libxml 은 /usr/include/libxml2/

# apxs -c -I/usr/include/libxml2 -I. -i mod_proxy_html.c
# apxs -c -I/usr/include/libxml2 -I. -i mod_xml2enc.c

LoadModule proxy_module      modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module    modules/mod_headers.so
LoadFile   /usr/lib/libxml2.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule xml2enc_module modules/mod_xml2enc.so

  • open/apache.txt
  • 마지막으로 수정됨: 2020/06/02 09:25
  • 저자 127.0.0.1