티스토리 뷰

Ubuntu 에서 Apache 서버 UserDir(유저 디렉토리) 설정

유분투 Apache의 UserDir 을 설정하는 방법은 조금 틀립니다.

저두 이거때문에 처음에 인터넷을 한참 찾았어요

유분투wiki에 있는 원문입니다.

apache2.conf is where the main configuration is, it used to be httpd.conf, so don't be fooled.
mods-available/is the directory with all the modules that are available. The .loadcontain the Apache directives that are needed to load the modules. Andthe .conf are the configuration directives for each module.
mods-enabled/is the directory that contains the symbolic links to the modules thatwe want to enable from mod-available/. At least the .load file must bethere, so we will have: /etc/apache2/mod-enabled/modulex.load ->/etc/apache2/mod-available/modulex.load
Let's take this to practice, say we want to enable user directories:

(www.myurl.com/~someuser/). First uncomment the following in apache2.conf:

Next, we create the symbolic links for this module and restart the server:

cd /etc/apache2
ln -s mods-available/userdir.* /etc/apache2/mods-enabled/  
/etc/init.d/apache restart
Thisworks for all the modules you want to load. Now let's try someoptimization methods. Apache uses a great deal of resources, speciallyRAM, because it accumulates whatever is necessary to accommodate whatit's serving and this process never decreases until it is complete.This takes up as much RAM as the largest dynamic php?keyword=script">script.




Ubuntu에서는기존아파치설정파이인 httpd.conf가 apache2.conf로 대치 됩니다.

그러나 apache2.conf 에서 아무리찾아봐도 UserDir 관련 설정부분은 없습니다.


/ect/apache2/mods-available/userdir.* 파일을 복사하여 /etc/apache2/mods-enabled/ 에 붙여넣기를한후  아파치를 제시작 

(mods-available폴더에 파일이름이 userdir인것은 2개인가 있을거예요. 그

파일을 파일브라우져로 복사해서 mods-enabled폴더에 붙여넣기 하세요.)


아파치를 재시작하는 방법은 터미널을 실행하신후


/usr/sbin/apache2 -k restart


이제 시스템 ->관리 ->사용자와 그룹에서 유저를 추가한후 /home/USER/public/index.php?keyword=html">html 파일을 만들어


public_php?keyword=html">html은 꼭만들어주셔야해요 아파치에서 localhost/~USER 로 접속하면 자동으로 /home/USER/public_php?keyword=html">html/ 을 들여다 보게되요 만약에 public_php?keyword=html">html폴더 이름이 맘에안드시면 아래 아까 복사/붙이기한 /etc/apache2/mods-enabled/userdir.conf

파일의 UserDir public_php?keyword=html">html 부분을 수정하시면됩니다.

접속확인은


localhost/~USER

로 접속해보시면 됩니다. 저는 testkorea라는 유저를 생성해서 안에 public_php?keyword=html">html폴더를 생성한후 접속해봐았습니다.
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함