webapp:apache:http.conf-2
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 다음 판 | 이전 판 | ||
| webapp:apache:http.conf-2 [2012/10/26 14:44] – 바깥 편집 127.0.0.1 | webapp:apache:http.conf-2 [2024/04/23 22:44] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| + | < | ||
| + | '' | ||
| + | |||
| + | httpd.conf 위치는 컴파일 하면 아마, / | ||
| + | |||
| + | ====== directory 브라우징 블럭 ====== | ||
| + | |||
| + | 디렉토리 설정에서 Options 항목에 -Indexes 추가 | ||
| + | |||
| + | <code apache> | ||
| + | < | ||
| + | Options FollowSymLinks | ||
| + | AllowOverride None | ||
| + | Options -Indexes | ||
| + | </ | ||
| + | </ | ||
| + | ======= 유저 개인마다 public_html로 웹 게시 기능 ===== | ||
| + | |||
| + | 각 유저마다 www 웹을 게시할 수 있게. | ||
| + | |||
| + | vhost를 설정하면, | ||
| + | 설정이 뭔가 잘못한듯. | ||
| + | |||
| + | <code apache> | ||
| + | < | ||
| + | # | ||
| + | # UserDir is disabled by default since it can confirm the presence | ||
| + | # of a username on the system (depending on home directory | ||
| + | # permissions). | ||
| + | # | ||
| + | #UserDir disable | ||
| + | # | ||
| + | # To enable requests to /~user/ to serve the user's public_html | ||
| + | # directory, remove the " | ||
| + | # the following line instead: | ||
| + | # | ||
| + | UserDir public_html | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 이 후에 | ||
| + | |||
| + | <code apache> | ||
| + | chmod 711 / | ||
| + | </ | ||
| + | |||
| + | 각 개인 폴더에 권한 설정 | ||
| + | |||
| + | <code apache> | ||
| + | < | ||
| + | AllowOverride FileInfo AuthConfig Limit | ||
| + | Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec | ||
| + | <Limit GET POST OPTIONS> | ||
| + | Order allow,deny | ||
| + | Allow from all | ||
| + | </ | ||
| + | #< | ||
| + | # Order deny,allow | ||
| + | # Deny from all | ||
| + | #</ | ||
| + | </ | ||
| + | </ | ||
| + | ====== rewriteRule ===== | ||
| + | |||
| + | rewrite 모듈 사용시 로그 확인을 위한 로그 정보 | ||
| + | |||
| + | <code apache> | ||
| + | RewriteLog | ||
| + | RewriteLogLevel 9 | ||
| + | </ | ||
| + | |||
| + | ====== virtual host ====== | ||
| + | |||
| + | <code apache> | ||
| + | NameVirtualHost {Your IP}:80 | ||
| + | |||
| + | < | ||
| + | ServerAdmin | ||
| + | DocumentRoot | ||
| + | ServerName | ||
| + | ErrorLog | ||
| + | CustomLog | ||
| + | < | ||
| + | # | ||
| + | # | ||
| + | CBandSpeed | ||
| + | CBandRemoteSpeed 600 5 10 | ||
| + | </ | ||
| + | < | ||
| + | Options Indexes FollowSymLinks | ||
| + | AllowOverride None | ||
| + | Deny from all | ||
| + | Allow from {some IP} | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | ======= cband setting ===== | ||
| + | |||
| + | <code apache> | ||
| + | LoadModule cband_module | ||
| + | # | ||
| + | # c-band setting | ||
| + | # | ||
| + | < | ||
| + | < | ||
| + | SetHandler cband-status | ||
| + | Order deny,allow | ||
| + | Deny from all | ||
| + | Allow from {some IP} | ||
| + | </ | ||
| + | < | ||
| + | SetHandler cband-status-me | ||
| + | Order deny,allow | ||
| + | Deny from all | ||
| + | Allow from {some IP} | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | 이건 설치 법이 간단하지 않다. | ||
| + | |||
| + | - cband 소스를 받아야 한다. | ||
| + | - 기본 설치해도 apxs, cband 설치 | ||
| + | - yum -y install httpd-devel.i386 -> 개발툴 설치 | ||
| + | - mod-cband-0.9.7.5.tgz 압축 푼다. | ||
| + | - mod-cband-0.9.7.5 폴더로 이동 | ||
| + | |||
| + | <code bash> | ||
| + | # http를 yum(자동설치)한 경우 | ||
| + | # ./configure --with-apxs=/ | ||
| + | ./ | ||
| + | |||
| + | make | ||
| + | |||
| + | make install | ||
| + | </ | ||
| + | |||
| + | 까지 하면 자동으로 설치된다. 컴파일해서 설치하는게 싫어도 선택 여지가 없는 듯. | ||
| + | |||
| + | 참조. 1번이 설치에는 유용, 2번이 세팅에 필요한 정보. -> 설치, 사용법은 따로 정리해야 할만큼 복잡하다. | ||
| + | |||
| + | - http:// | ||
| + | - http:// | ||
| + | - http:// | ||
| + | - http:// | ||
| + | - http:// | ||
| + | |||
| + | ====== etc ===== | ||
| + | |||
| + | <code apache> | ||
| + | # 아이피와 포트 추가 | ||
| + | ServerName {Your IP}:80 | ||
| + | </ | ||