[Linux] Apache Web Server μ€μΉνλ λ°©λ² *μ€λΌν΄ μ°λ 2ν*
π‘ Linuxμ Apache Web Server μ€μΉνκΈ°
β Apache Web Server λ?
μνμΉ μννΈμ¨μ΄ μ¬λ¨μμ κ΄λ¦¬νλ μ€νμμ€ μΉ μλ²λ‘μ, 리λ μ€λ₯Ό OSλ‘ νμ¬ κ°μ₯ λ§μ΄ μ¬μ©λκ³ μλ€. μΉ μλ² κ΅¬λμ μν APM μ€ A λΆλΆμ ν΄λΉνλ κ²μ΄λ€.
β Apache Web Server μ€μΉνκΈ°
μλ λͺ λ Ήμ΄λ‘ λ€μ΄λ‘λ
yum install -y httpd
=> μ λ°©λ²μΌλ‘ μ λμ§ μλλ€λ©΄,
https://ansan-survivor.tistory.com/120
μ°Έκ³ νκΈ°!!!
ν¨ν€μ§ μ€μΉ νμΈ
rpm -qa | grep httpd
httpd -v
=> μ λλ‘ μ€μΉκ° λμ΄μλμ§ νμΈ μλ£
μλΉμ€ μ¬μμ
systemctl start httpd # μλΉμ€ μμ
systemctl enable httpd # μλΉμ€ λΆν
λ λλ§λ€ μ€ν
λ°©νλ²½ μ€μ
# μλΉμ€ μΆκ°
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --permanent --add-port=80/tcp # 80λ² ν¬νΈ μΆκ°(httpκ° μ£Όλ‘ μ¬μ©νλ ν¬νΈ)
firewall-cmd --reload # μ μ©
μλΉμ€μ ν¬νΈ μν νμΈ
netstat -ntlp | grep httpd
httpd.conf νμΌ μ€μ λ³κ²½
cd /etc/httpd/conf
=> μ κ²½λ‘λ‘ μ΄λνκΈ°
vi httpd.conf
=> μ νμΌ μ€ ServerName λΆλΆμ μ£Όμ ν΄μ νκΈ° or μ§μ μ λ ₯
↓↓↓ νΈλ¬λΈ μν π¨π¨π¨
=> μ κ³Όμ μ μ§ννκ² λ μ΄μ ! Trouble Shooting π
localhost λλ λ³ΈμΈ νΈμ€νΈ IPλ₯Ό μ¬μ©ν΄μ νμΈ
↓↓↓ νΈλ¬λΈ μν π¨π¨π¨
λͺ¨λ μ€μ μ΄ λ€ μλ²½νκ² λμ΄μμμλ λΆκ΅¬νκ³ localhost λ° νΈμ€νΈ IP μ£Όμλ‘ μ μμ΄ λμ§ μμλ€...
νμ°Έμ μ½μ§ν λμ NATλ₯Ό μ΄μ©ν κ°μ μλ²λ₯Ό μ¬μ©νκ³ μλ μν©μμ λμΉ λΆλΆμ΄ μλ€λ κ²μ κΉ¨λ¬μλ€...! π
=> μλ¬ ν΄κ²° κ³Όμ !!! Trouble Shooting π
νμ§λ§, μ νλ©΄μ default νμ΄μ§μΌ λ μ΄λ κ² λμ¨λ€. λμ μΉ μ¬μ΄νΈλ₯Ό λ§λ€μμΌλ μ무 κΈμλΌλ λμ보μ.
λλ§μ μΉ νμ΄μ§ λ§λ€μ΄λ³΄κΈ°
/var/www/html
=> μ κ²½λ‘λ‘ μ΄λ
vi index.html
=> μ λͺ λ Ήμ΄λ₯Ό ν΅ν΄ index.html νμΌμ μμ±
<html>
<body>
TestPage
Success!!!
</body>
</html>
=> κ·Έ μμ λ€μκ³Ό κ°μ λ΄μ©μ μ λ ₯ (κ°λ¨ν μΉ νμ΄μ§λ₯Ό λ§λ€ μ μλ html μ½λμ΄λ€)
π Oracle μ°λ μλ¦¬μ¦ π
1. https://ye5ni.tistory.com/154
2. https://ye5ni.tistory.com/164
3. https://ye5ni.tistory.com/165
4. https://ye5ni.tistory.com/174