專業(yè)建站公司提供詳細(xì)的功能描述及報(bào)價(jià)如何在百度做推廣
作業(yè):請(qǐng)給openlab搭建web網(wǎng)站
網(wǎng)站需求:
1.基于域名 www.openlab.com 可以訪問(wèn)網(wǎng)站內(nèi)容為 welcome to openlab!!!
2.給該公司創(chuàng)建三個(gè)子界面分別顯示學(xué)生信息,教學(xué)資料和繳費(fèi)網(wǎng)站,
1、基于 www.openlab.com/student 網(wǎng)站訪問(wèn)學(xué)生信息,
2、基于 www.openlab.com/data 網(wǎng)站訪問(wèn)教學(xué)資料
3、基于 www.openlab.com/money 網(wǎng)站訪問(wèn)繳費(fèi)網(wǎng)站。
3.要求
(1)學(xué)生信息網(wǎng)站只有 song 和 tian 兩個(gè)用戶可以訪問(wèn),其他用戶不能訪問(wèn)。
(2)訪問(wèn)繳費(fèi)網(wǎng)站實(shí)現(xiàn)數(shù)據(jù)加密基于 https 訪問(wèn)。
- 搭建web網(wǎng)站
1 cd /etc/yum.repos.d/2 vim rpm.repo3 mount /dev/sr0 /mnt/4 cd 5 yum install httpd -y6 mkdir -pv /www/openlab7 vim /etc/hosts8 echo welcome to openlab ! > /www/openlab/index.html9 systemctl restart httpd10 cd /etc/httpd/conf.d11 vim vhost.conf12 systemctl restart httpd13 setenforce 014 firewall-cmd --permanent --add-service=http15 firewall-cmd --reload
此步驟相關(guān)配置文件如下:
- 創(chuàng)建三個(gè)子界面
[root@localhost ~]# mkdir /www/openlab/student
[root@localhost ~]# mkdir /www/openlab/data
[root@localhost ~]# mkdir /www/openlab/money
[root@localhost ~]# echo welcome to openlab of student ! > /www/openlab/student/index.html
[root@localhost ~]# echo welcome to openlab of data ! > /www/openlab/data/index.html
[root@localhost ~]# echo welcome to openlab of money ! > /www/openlab/money/index.html
[root@localhost ~]# cat /www/openlab/student/index.html
welcome to openlab of student !
[root@localhost ~]# cat /www/openlab/data/index.html
welcome to openlab of data !
[root@localhost ~]# cat /www/openlab/money/index.html
welcome to openlab of money !
[root@localhost ~]#
- 加密
33 htpasswd -c /etc/httpd/user song34 htpasswd /etc/httpd/user tian35 cd /etc/httpd/conf.d36 vim vhost.conf37 systemctl restart httpd40 dnf install mod_ssl41 cd /etc/pki/tls/certs/42 openssl genrsa > jiami.key43 openssl req -utf8 -new -key jiami.key -x509 -days 100 -out jiami.crtYou are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:86
State or Province Name (full name) []:shanxi
Locality Name (eg, city) [Default City]:xian
Organization Name (eg, company) [Default Company Ltd]:xianopen
Organizational Unit Name (eg, section) []:rhce
Common Name (eg, your name or your server's hostname) []:www.openlab.com
Email Address []:admin44 mv jiami.key ../private/45 cd /etc/httpd/conf.d46 vim vhost.conf47 systemctl restart httpd48 setenforce 049 firewall-cmd --permanent --add-service=https50 firewall-cmd --reload 51 vim vhost.conf52 systemctl restart httpd
測(cè)試結(jié)果