Nginx 관련
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2. Nginx 설치
sudo yum install -y nginx
Nginx 상용 명령
nginx # nginx
nginx -s reload #
nginx -s reopen # nginx
nginx -s stop # nginx
nginx -s quit # nginx
Nginx 설정 정보
/usr/share/nginx/html #
/etc/nginx/conf.d/default.conf #
/etc/nginx/conf.d/ # Nginx
/etc/nginx/nginx.conf # Nginx
Nginx 루트 권한 설정
/etc/nginx/nginx.conf user nginx; user root root;
Nginx 사용자 정의 접근 경로 및 그림 보 여주 기 설정
/etc/nginx/conf.d/default.conf
location / {
root /root/home; #
index index.html index.htm;
}
location /images/ {
root /root/home/;
autoindex on;
}
Nginx 도 메 인 이름 프 록 시 포트 설정
/etc/nginx/conf.d/default.conf
server {
listen 80;#
server_name mock.it100.xyz;
location / {
proxy_pass http://118.25.18.13:7300; #
}
}