Apache HTTP Server安裝與啟動
(1) sudo apt-get install apache2
(2) /usr/sbin/apache2 –V
(3) 啟動 mod_userdir 動態模組 sudo a2enmod userdir
(4) sudo nano /etc/apache2/httpd.conf
UserDir kmdepot
kmdepot> #*表示每一個使用者
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Order allow,deny
Allow from all
Order deny,allow
Deny from all
(5) sudo /etc/init.d/apache2 restart
(6)$ cd ~
$ mkdir kmdepot
$ chmod 755 kmdepot 可讀可執行
nano index.html
(7) cd /var/www #apache server的根目錄
sudo ln -s /home/student/kmdepot student
(8) scp -r ./ root@172.24.100.2:/var/www
拷貝到99-DM /var/www的目錄裡
(9)
在NAT機器裡設定
sudo nano /etc/rc.local
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to 172.24.100.2
small bussiness