본문 바로가기

infra/etc14

[Nginx] (13: Permission denied) while connecting to upstream 해결 Nginx 환경에서 리버스 프록시를 이용해 스프링 부트와 연동 과정을 진행하던 중 permission denied에 부딪혔다. 결론적으로 SELinux 문제였다. SeLinux에서 포트에 접근을 방지하기때문에 생기는 문제다. audit.log 내용을 확인해 보면 nginx에 접근할 때마다 에러 로그가 찍히는 걸 확인할 수 있다. tail -f /var/log/audit/audit.log | grep nginx | grep denied 아래 명령어를 입력하면 Nginx에서 네트워크 자원에 접근할 수 있는 룰이 추가되고 문제가 해결된다. setsebool -P httpd_can_network_connect 1 참고 링크 : confluence.atlassian.com/bitbucketserverkb 2019. 10. 13.
[Nginx] CentOS에 nginx yum 이용하여 설치 하기 yum을 이용하여 nginx를 간편하게 설치해 보자. 설치는 매우 간단하다. 아래 명령어를 입력해주면 간단하게 설치가 끝난다. [itsme@localhost ~]$ sudo yum -y install nginx 명령어를 실행하면 아래와 같은 메시지가 출력되고 자동으로 dependency를 체크해서 설치를 진행한다. source cod를 이용해 설치할 때보다 매우 간단하게 끝난다. 물론 인터넷 외부망이 오픈되어 있어야 한다. [itsme@localhost ~]$ sudo yum -y install nginx [sudo] password for itsme: Last metadata expiration check: 0:42:30 ago on Thu 10 Oct 2019 09:25:50 PM KST. Depen.. 2019. 10. 10.
[CentOS] sudo가 안될때 - sudoers 추가 하기 centos를 처음 설치하고 yum 업데이트를 실행하려는데.. itsme is not in the sudoers file. This incident will be reported. 이런 문구가 나왔다. CentOS에서는 기본적으로 일반 유저가 sudo 명령어를 사용 불가능하다. [itsme@localhost ~]$ sudo yum -y update [sudo] password for itsme: itsme is not in the sudoers file. This incident will be reported. 뭔가 하고 찾아보니 sudoers에 로그인한 유저를 추가해 주어야 한다고 한다. 방법은 두 가지가 있다. 1. /etc/sudoers에 유저 추가 하기. 2. sudo 그룹에 유저 추가 하기. 먼.. 2019. 10. 10.
[CentOS] sudo 명령어 다음은 sudo 명령어의 옵션 리스트 이다. [itsme@localhost ~]$ sudo -h sudo - execute a command as another user usage: sudo -h | -K | -k | -V usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user] usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command] usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout] [-u user] [VAR=value] .. 2019. 10. 10.