본문 바로가기
리눅스

[리눅스] nginx 외부접속_24.02.24

by 황오독 2024. 2. 24.

1) nginx 확인

systemctl status nginx

=> active (running)

nginx : 80

 

2) 바로 chrome에서 http://10.0.2.16 접속하면 실패

 

3) 포트포워딩 추가

4) 방화벽(firewall) 중지 및 비활성화

sudo systemctl status firewalld

sudo systemctl stop firewalld

sudo systemctl disable firewalld

 

5) chrome에 127.0.0.1:8011로 들어갔을 때, 해당화면이 표시되면 성공

 

* 연결이 여전히 되지 않는 경우

- nginx가 켜져있는지 확인 (systemctl status nginx)

- 방화벽이 켜져있는지 확인 (systemctl status firewalld)

 

 

6) selinux 비활성화

* SELinux : Linux의 보안을 강화해주는 보안 강화커널

-  간섭쟁이

 

sudo vim /etc/selinux/config

 

SELINUX : disabled로 수정

 

=> 재부팅