티스토리 뷰
nginx 버전 정보 감추기
http {
server_tokens off;
}
vhost 설정 위한 디렉토리 생성 및 지정
http {
include sites-enabled/*;
}
include /etc/nginx/conf.d/*.conf; 이 디렉토리 안에 넣는것과 차이점?
아이피 차단
server {
allow 192.168.0.0/24;
deny all;
}
192.168.0.0/24 아이피 대역을 제외하고 차단
디렉토리 차단
location ~ /(inc|local)/.* {
deny all;
return 404;
}
설정된 도메인 이외 차단
server {
listen 80 default;
server_name _;
location / {
deny all;
return 406;
}
}
도메인 리다이렉트
server {
listen 80;
server_name 도메인;
location / {
return 301 http://리다이렉트할도메인$request_uri;
}
}
php-fpm 연동 설정
location ~ \.(ph(p[345]?|t|tml|ps)|html?|inc)$ {
fastcgi_pass unix:/var/run/php-fpm/www.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
'Linux' 카테고리의 다른 글
ntp pool project (0) | 2019.06.05 |
---|---|
ntp (time.google.com) (0) | 2019.05.28 |
nginx - php-fpm 연동 (0) | 2019.05.16 |
telnet 통신 테스트 (0) | 2019.04.02 |
gitlab 설치 (0) | 2019.03.22 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- SSL
- 인증서
- mod_security
- centOS7
- ssh
- WAF
- iptables
- cURL
- IPSEC
- softether
- OpenVPN
- glusterfs
- mariadb
- L2TP
- MySQL
- pptp
- 리눅스
- HAProxy
- galera
- 베이어다이나믹
- GeoIP
- centos8
- NGINX
- virtualbox
- yum
- ntp
- kvm
- php
- Apache
- gitlab
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함