以下配置的路徑以阿里云提供的標(biāo)準(zhǔn)環(huán)境路徑為準(zhǔn),如果您另行安裝,請(qǐng)根據(jù)實(shí)際安裝路徑配置。
1、 登錄您的Linux云主機(jī),進(jìn)入WEB服務(wù)器配置文件夾;
運(yùn)行命令:cd /aliyun/webserver/apache2.2.15/conf
2、 備份WEB服務(wù)器配置文件;
運(yùn)行命令:cp httpd.conf httpd.conf.bak
3、 修改WEB服務(wù)器配置文件;
運(yùn)行命令:vi + httpd.conf
4、 添加網(wǎng)站配置信息;
1) 按字母i鍵,進(jìn)入編輯模式;
2) 在配置文件末尾,添加
<VirtualHost *:80>
ServerAdmin admin@domain(您的郵箱)
DocumentRoot /alidata/www/wwwroot/phpwind (網(wǎng)站存放路徑)
ServerName test.com (網(wǎng)站域名)
ServerAlias
www.test.com(網(wǎng)站別名)
ErrorDocument 404 /404.php
DirectoryIndex index.html index.php index.htm
<Directory "/alidata/www/wwwroot/phpwind">(網(wǎng)站存放路徑)
Options +Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
3) 保存修改。按ESC鍵,輸入”:wq”后回車;
4) 使配置生效。運(yùn)行命令:../bin/apachectl graceful
5) 測(cè)試網(wǎng)站。請(qǐng)?jiān)跒g覽器中輸入域名,測(cè)試設(shè)置。
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。