๐ก ํฌํธ ์ค์บ๋ netstat -natlp | grep httpd
๐ก ํ๊ฐ์ง ํฌํธ ์ค์บ๋ lsof -i tcp:80 #http 443 #https
๐ก ๋ฒ์ ํ์ธ httpd -v
# ์ํ์น ์๋ฒ ์์
vim /etc/httpd/conf/httpd.conf
> Order allow, deny
>Allow from all
>deny from 192.168.120. # ํด๋น ip ๋ฒคํ๊ธฐ
vim index.html
# window ๋ฐฉํ๋ฒฝ
firewall.cpl > ๊ณ ๊ธ ์ค์ > ์ธ๋ฐ์ด๋ ๊ท์น > ๊ฐ์ WEB > ํ๋กํ ์ฝ ๋ฐ ํฌํธ > ๋ก์ปฌ ํฌํธ 10080, 10081๋ก ์ค์
# ํฌํธ ์ค์
Virtual Network Editor - NAT Settings - Host port 10080/10081 IP 192.168.111.100/200 machine port 80
# ํฌํธ ์ค์
Edit - virtual network edit - vmnet8 NAT Setting - 192.168.111.200:80
<http://192.168.0.40:10081/wordpress/>
# Digest md5 ์ ์ฅ ์ํธ
# ์ค์ ํ์ผ ์์ฑ
vim /etc/httpd/conf.d/auth_digest.conf
> <Directory /var/www/html/digest>
AuthType Digest
AuthName "Digest Private Area"
AuthUserFile /etc/httpd/.htdigest
Require valid-user
Order deny,allow
Deny from all
Allow from 192.168.0. 192.168.111.
</Directory>
# ๋น๋ฐ๋ฒํธ ๋ง๋ค๋ฉด์ ํ์ผ๊น์ง ์์ฑ
htdigest -c /etc/httpd/.htdigest "Digest Private Area" benmin
htdigest /etc/httpd/.htdigest "Digest Private Area" jain
mkdir digest
cp index.html digest/index.html
cd digest/
vim index.html
cat /etc/httpd/.htdigest # ๊ณ์ ๊ณผ ๋น๋ฐ๋ฒํธ ํ์ธ
<http://192.1168.111.100/digest/>
# Basic ์ ์ฅ ์ํธ
# ์ค์ ํ์ผ ์์ฑ
vim /etc/httpd/conf.d/auth_basic.conf
> <Directory /var/www/html/basic>
AuthType Basic
AuthName "Basic Authentication Test"
AuthUserFile /etc/httpd/.htpasswd
Require user benmin jain
Require valid-user
Order deny,allow
Deny from all
Allow from 192.168.0. 192.168.111.
</Directory>
# ๋น๋ฐ๋ฒํธ ๋ง๋ค๋ฉด์ ํ์ผ๊น์ง ์์ฑ
htpasswd -c /etc/httpd/.htpasswd benmin
htpasswd /etc/httpd/.htpasswd jain
systemctl restart httpd
mkdir basic
cp /var/www/html/index.html index.html
cat /etc/httpd/.htpasswd # ๊ณ์ ๊ณผ ๋น๋ฐ๋ฒํธ ํ์ธ
<http://192.168.111.100/basic/>