> ## Content Index
> Fetch the complete content index at: https://suitmyself.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# UBUNTU 에 NGINX설치
- URL: https://suitmyself.com/ubuntu-e-nginxseolci/
- Published: 2023-05-29T10:52:02.000Z
- Updated: 2026-09-16T03:10:38.000Z
- Author: Benjamin Kim
- Tags: Server, apache, ubuntu, #Import 2026-09-15 05:58

## UBUNTU 에 NGINX설치

1. 서버의 패키지 목록 업데이트

```
sudo apt update
sudo apt upgrade

```

불필요한 패키지 삭제

```
sudo apt autoremove

```

1. Nginx 설치

```
sudo apt install nginx

```

제거할 경우

```
sudo apt remove nginx 

```

1. 실행

```
sudo service start nginx
sudo service status nginx
systemctl status nginx.service

```

1. Nginx Version 확인

```
sudo dpkg -l nginx
nginx -v

```

1. Nginx 경로  
apt-get을 이용하여 패키지 설치 방법을 이용하면 기본 폴더는 "/etc/nginx/"

```
sudo find / -name nginx.conf

```

nginx.conf: nginx가 동작해야 할 방식을 설정 값을 통해 지정, root 권한만 수정이 가능하다

```
sudo vim nginx.conf

```

1. nginx 구동 테스트

```
netstat -lntp

```

80번 포트가 리스닝되고 있으면 실행된 상태이다.

만약 netstat이 없다면

```
apt install net-tools

```