2020. 5. 7.

[Linux] apache vsftp 올리기 정리


#아파치 서버 정지
/app/apache/bin/apachectl stop

디렉터리 구조 변경



경로 설정 변경

vi /app/apache/conf/httpd.conf


vi /app/apache/conf/extra/httpd-vhosts.conf


계정을 만든다


cd /home
ls -al
chgrp -R web httpd


cd /home/httpd
chmod 775 -R *
ls -al


yum install -y bind
yum install -y vsftpd
vi /etc/vsftpd/vsftpd.conf


vi /etc/vsftpd/chroot_list

계정들을 넣어줘야한다.

systemctl stop vsftpd.service
systemctl start vsftpd.service

mkdir /home/first/html
mkdir /home/second/html

mount --bind   /home/httpd/first  /home/first/html
mount --bind  /home/httpd/second  /home/second/html


마운트하면 기존에 있는 파일이 보임
ex)/home/httpd/first/index.html
ex)/home/first/html

vi /app/apache/conf/extra/httpd-vhosts.conf


웹서버 ip 모든으로 표현된 *으로 변경 해준다.

* 부팅시 자동실행되도록 채워넣을것 vsftp chroot

192.168.10.153:80 >
serveradmin first@nave.rcom
documentroot "/home/httpd/first"
servername first.kst11.gor
options FollowSymLinks
Allowoverride None
Order deny,allow
Deny from all

192.168.10.153:80 >
serveradmin second@nave.rcom
documentroot "/home/httpd/second"
servername second.kst11.gor
options FollowSymLinks
Allowoverride None
Order deny,allow
Deny from all



/app/apache/bin/apachectl stop
/app/apache/bin/apachectl start

확인



댓글 없음:

댓글 쓰기