8/1/12

CẤU HÌNH PUBLISH TÀI NGUYÊN WEB


1.1.1.     CẤU HÌNH PUBLISH TÀI NGUYÊN WEB

Mô hình và yêu cầu bài tập

Hướng dẫn thực hiện

a.      Tạo virtual Directory
b.      Khai báo Alias
c.      Chỉ định quyền hạn
d.      Reload web service
e.      Kiểm tra hoạt động của http://serverlinux.vn/tailieu
a)   Kiểm tra hoạt động của trang web http://serverlinux.vn/
b)  Cấu hình Alias trong tập tin cấu hình /etc/httpd/conf/httpd.conf
Alias /icons/ "/var/www/icons/"
<Directory "/var/www/icons">
      Options Indexes MultiViews
      AllowOverride None
      Order allow,deny
      Allow from all
</Directory>

Alias /tailieu/soft
<Directory /soft>
      Options Indexes MultiViews
Order allow,deny
      Allow from all
</Directory>
c)   Khởi động lại web service
[root@localhost ~]# /etc/init.d/httpd restart
Stopping httpd:                     [OK]
Starting httpd:                     [OK]
d)  Từ windows truy cập vào trang http://www.serverlinux.vn/tailieu
e)   Giới hạn truy cập
a.      Để cấm truy cập vào thư mục tailieu, chúng ta tiến hành bỏ bớt dòngOptions Indexes MultiViews trong tập tin cấu hình httpd.conf như bên dưới:
Alias /icons/ "/var/www/icons/"
<Directory "/var/www/icons">
      Options Indexes MultiViews
      AllowOverride None
      Order allow,deny
      Allow from all
</Directory>
Alias /tailieu/soft
<Directory /soft>
#Options Indexes MultiViews
      Order allow,deny
      Allow from all
</Directory>
f)    Khởi động lại web service
[root@localhost ~]# /etc/init.d/httpd restart
Stopping httpd:               [OK]
Starting httpd:               [OK]
g)   Từ windows truy cập vào trang http://www.serverlinux.vn/tailieu

Bài đăng phổ biến