Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 자바스크립트비밀번호검증
- mysqldump: Got error: 1045
- php 배열제거
- (using password: YES)" when trying to connect
- 아파치 웹 서버의 정보 숨기기
- php 이미지 url 검증 함수
- usb efi 시스템 파티션 삭제
- bootstrap modal
- modsecurity 설치
- PHP 구글 OTP 인증
- httpd.conf 보안 설정
- 윈도우 환경 아파치 mod_security2 설치
- 파라미터 & 오류
- group_concat 구분자
- PHP 구글 OTP 연동
- apple push notification service (apns) is changing
- javascript
- 구글 OTP 인증
- 비밀번호검증정규식
- html pdf 변환
- 우분투 mysql 비밀번호 없이 로그인 될때
- 숫자 3자리(천단위) 마다 콤마 찍기
- mod_security2 설치
- bootstrap
- 윈도우 mod_security2
- apache mod rewrite
- mariadb upgrade
- sha-2 root
- 비밀번호정규식
- PHP 정규식 예제
Archives
- Today
- Total
투덜이 개발자
[apache] 아파치 설정 보안 본문
반응형
<VirtualHost *:80>
# ServerAdmin webmaster@localhost
ServerName www.yourdomain.or.kr
DocumentRoot /data/www/yourdomain.or.kr/www
DirectoryIndex index.php
ErrorLog "|/usr/bin/cronolog ${APACHE_LOG_DIR}/%Y%m%yourdomain.or.kr_error.log"
CustomLog "|/usr/bin/cronolog ${APACHE_LOG_DIR}/%Y%m%d_yourdomain.or.kr_access.log" combined
# mod_rewrite 활성화
RewriteEngine On
# QUERY_STRING에서 XSS 특수문자 차단
RewriteCond %{QUERY_STRING} [<>\"']
RewriteRule .* - [F,L]
# REQUEST_URI(경로)에서 XSS 특수문자 차단
RewriteCond %{REQUEST_URI} [<>\"']
RewriteRule .* - [F,L]
# .php 뒤에 슬래시가 붙으면 403 또는 404로 차단
RewriteCond %{REQUEST_URI} \.php/
RewriteRule .* - [F,L]
# 사용자 정의 에러 페이지 설정
ErrorDocument 403 /403.php
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
</VirtualHost>
# mod_rewrite 활성화
RewriteEngine On
# QUERY_STRING에서 XSS 특수문자 차단
RewriteCond %{QUERY_STRING} [<>\"']
RewriteRule .* - [F,L]
# REQUEST_URI(경로)에서 XSS 특수문자 차단
RewriteCond %{REQUEST_URI} [<>\"']
RewriteRule .* - [F,L]
# .php 뒤에 슬래시가 붙으면 403 또는 404로 차단
RewriteCond %{REQUEST_URI} \.php/
RewriteRule .* - [F,L]
반응형
'OS > Linux' 카테고리의 다른 글
Ubuntu ssh 접속시 root 권한 문제 해결 (0) | 2025.03.12 |
---|---|
[우분투] Ubuntu IP 설정 방법 (24.04.1) (0) | 2024.11.21 |
우분투 SSH 서버 설치하기 (Ubuntu SSH server) (0) | 2024.11.18 |
우분투 아파치 홈 디렉토리 변경 (2) | 2024.09.27 |
[CentOS 8] Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist (0) | 2024.05.16 |