2020. 5. 8.

[Linux] apache 개인홈페이지 설정확인 정리


cd /app/apache/conf

vi /app/apache/conf/httpd.conf
# vhost 전에 설정 주석처리
# ifconfig 가상분할 없애고
# 네트워크 재시작
vi /app/apache/conf/extra/httpd-userdir.conf

userDir html

디렉토리를 만든다.
html">

# LlserDir: The name of the directoy that is appended onto a user's home 
# directory if a wuser request is received. Note that you must also set 
# the default access control for these directories, as in the example below. 
UserDir html 
# Control access to UserDir directories. The following is an example 
# for a site where these directories are restricted to read-only. 
<Directoy " / home/ 
AllowOverride Filelnfo AuthConfig Limit Indexes 
Options Multiviews Indexes SymLinksIfO•wnermatch IncludesNoExec 
<Limit GET POST OPTIONS> 
Order allow, deny 
Allow from all 
< / Limit> 
<LimitExcept GET POST OPTIONS> 
Order deny, allow 
Deny from all 
< / LimitExcept>

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

Index of / 
152/ 
153/ 
first/ 
htmlZ 
second/ 
login as: rcot 
root@192.168.Ia.153's password: 
Last login: Thu may 7 2ø2ø 
Croot@153 cd /app/apache/conf 
Croot@153 Is 
extra httpd.conf magic mime. types 
original 
Croot@153 cd extra 
Croot@153 Is 
httpd-autoindex.conf 
httpd-dav.conf 
httpd-default.conf 
httpd-languages.conf 
httpd-manual.conf 
httpd-mpm.conf 
httpd-ssl.conf 
httpd-userdir.conf 
httpd-vhosts.conf 
httpd-info.conf 
Croot@153 extra) # 
Croot@153 extra) # 
-bash: cd: extra: 
Croot@153 extra) # 
Croot@153 extra) # 
Croot@153 extra) # 
Croot@153 extra) # 
153 first httpd 
Croot@153 extra) # 
httpd-multilang-errordoc.conf 
vi . /extra/httpd-userdir.conf 
cd extra 
vi httpd-userdir.conf 
/app/apache/bin/apachectl stop 
/app/apache/bin/apachectl start 
Is / home 
prc second userl user2 web

아래 html 폴더가 있는 친구들만 index of 뜬다.

* 계정마다 관리 페이지 접속한다.

# Multi-language error messages 
#1ncIude conf/extra/httpd-multilang-errordoc.conf 
# Fancy directoy listings 
#1ncIude conf/extra/httpd-autoindex.conf 
# Language settings 
#1ncIude conf/extra/httpd-languages.conf 
# User home directories 
Include conf/extra/httpd-oserdir.conf 
# Real-time info on requests and configuration 
#1ncIude conf/extra/httpd-info.conf 
# Virtual hosts 
# Include conf/extra/httpd-vhosts.conf 
# Local access to the Apache HTTP Server Manual 
#1ncIude conf/extra/httpd-manual.conf

vi /app/apache/conf/extra/httpd-userdir.conf
# 아래 파일을 사용할것이므로 주석처리를 해제해준다.
Include conf/extra/httpd-userdir.conf

cd /home/
chmod o+rx first
chown html first
# 해당 홈디렉토리의 권한과 주인을 first 바꿔준다.

해당 계정으로 들어가본다.

e 
19216810.153/-firsv 
first 
/ —first/ 
192.168.10.153

o 
19216810153/-second/ 
second 
192.168.10.153 
/—secon...



get post 옵션
   
        Order allow,deny
        Allow from all
   
   
        Order deny,allow
        Deny from all
   
보통은 디버깅 할때 사용
웹에서 정보를 받을때 어떻게 할것이냐

댓글 없음:

댓글 쓰기