본문 바로가기

coding

x-powered-by / nginx server token 숨기기 / root dir 변경

크롬 개발자 도구 헤더상태
nginx.conf
0.00MB

보안을 위해 서버와 x-powered-by를 hide 합니다.

 

vi /etc/php.ini

vi를 이용하여 php.ini 보기

 

esc+: 를 이용하여 ?expose_php 검색

On->Off로 변경

upload_max_filesize 변경 2M->20M

wq 저장

vi /etc/nginx/nginx.conf

server_tokens off; 추가

 

systemctl restart php-fpm

systemctl restart nginx

nginx,php-fpm 재시작

 

제거된 server ver

root

/var/www/html로 변경

 

 

'coding' 카테고리의 다른 글

centos 8 root 비밀번호 변경  (0) 2020.02.23
Centos8 nginx + php7.2 + php-fpm + mariadb10.3.17 설치  (0) 2020.02.18