Apache服務(wù)器搭建
上下文搭建
Apache
#yuminstall-yhttpd
#mkdir-p/data/www/html
#vim/data/www/html/test.html
helloworld
#vim/etc/httpd/conf/httpd.conf
DocumentRoot"/data/www/html"
Requireallgranted
DirectoryIndexindex.htmltest.html
#semanagefcontext-a-thttpd_sys_content_t'/data?'//更改安全上下文
#restorecon-FvvR/westos/
#systemctlrestarthttpd.service
#curl-Ilocalhost
HTTP/1.1200OK
Date:Sun,15Mar201506:58:08GMT
Server:Apache/2.4.6
Last-Modified:Sun,15Mar201506:23:52GMT
ETag:"28-5114dc6fc9141"
Accept-Ranges:bytes
Content-Length:40
Content-Type:text/html;charset=UTF-8
配置虛擬主機
#vim/etc/httpd/conf.d/virtual.conf
ServerName.com.log//在/etc/httpd/logs/
Tags:上下文搭建,Apache服務(wù)器搭建
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。