locate index.html | fgrep nginx
cd /usr/share/nginx/html/
ls
80 => /usr/share/nginx/html/ (80포트에 연결된 웹루트)
locate nginx.conf
vim /etc/nginx/nginx.conf
cd /etc/nginx/conf.d/
ls
vim default.conf
sudo systemctl restart nginx
sudo mkdir -p /web/site0/public
cd /
ll (web이 root의 권한으로 되어 있음)
cd web
ls -ahl
sudo chown it:it -R . (지금 들어와있는 파일을 기준으로 하위의 모든 폴더의 권한을 it로 바꾼다는 의미)
cd site0/public
vim index.html (index에 내용 넣기)
cd /etc/nginx/conf.d/
sudo vim vhost.conf (가상 호스팅 설정을 담당할 파일에 하단의 내용넣기)
server {
listen 8011;
server_name _;
location / {
root /web/site1/public;
}
}
server {
listen 8012;
server_name _;
location / {
root /web/site2/public;
}
}
포트포워딩으로 8012포트로 연결
cd /web/ (web파일로 가서
cp -r site0 site2 (site0을 cp해서 site2를 만듬)
프로토콜(규약) : 서버와 클라이언트간의 약속
HTTP : 웹서비스
SSH(SFTP) : 리눅스 시스템 원격제어
FTP : 원격 파일 전송
**SSH 클라이언트**
-윈도우,putty (원격제어 중점)
-리눅스,ssh (원격제어 중점)
-파일질라 (원격 파일전송 중점)
**SSH 서버**
-리눅스 내부에 이미 설치되어 있는 sshd
윈도우 안에 있는 파일을 리눅스 안으로 옮기고 싶다..
파일질라