Web Server configuration (Linux)
Reference Table
Packages: httpd
Port : 80 http, 443
https
Configuration file:
/etc/httpd/conf/httpd.conf
Command
1. #rpm -qa |
grep httpd → enter
2. #yum install httpd*
-y → enter
3. #yum install wget*
-y → enter হল
contain পাওয়া ।
4. #cd /var/www/html → enter হল directory change করা ।
5. #ls → enter
6. #vim /var/ftp/pub/main.html → enter
<h1>
<html>there is no mother who loves her child</htm>
</h1>
file টি save করি ।
<h1>
<html>there is no mother who loves her child</htm>
</h1>
file টি save করি ।
7. #wget
/var/ftp/pub/main.html → enter হল html টি পাব ।
OR
#wget ftp://192.168.10.2/pup/main.html → enter
OR
#wget ftp://192.168.10.2/pup/main.html → enter
8. #ll → enter
9. #mv main.html index.html
→ enter হল main.html টি
(default) index.html এ rename হবে ।
10.
#ll
→ enter
11.
#vim /etc/httpd/conf/httpd.conf → enter
শেষ 7 line, copy করে নিচে past করি ।
<virtual host main.mainuddin.com :80>
serveradmin webmaster@main.mainuddin.com
DocumentRoot /var/www/html
servername main.mainuddin.com
OR
servername 192.168.10.2
ESC press করি
:wq → enter
শেষ 7 line, copy করে নিচে past করি ।
<virtual host main.mainuddin.com :80>
serveradmin webmaster@main.mainuddin.com
DocumentRoot /var/www/html
servername main.mainuddin.com
OR
servername 192.168.10.2
ESC press করি
:wq → enter
12.
#service httpd
restart → enter
#service httpd
on → enterনতুন করে আরো একটি website করতে হলে /var/ftp/pub এর ভিতর একটি directory তৈরি করে এর ভিতর html file তৈরি করি ।
This is very nice site This is post very helpful.Great article#.Thank you so much.
ReplyDelete