日本三级片在线观看视频_西西大胆午夜人体视频无码_少妇无码一区二区_亚洲天堂超碰_极品少妇被猛的白浆直流_91精品云霸高清中文字幕_草草五月天伊人_久久少妇无码专区_欧美激欧美啪啪5老太_日韩在线在线成人

幫助中心 >  技術(shù)知識(shí)庫 >  網(wǎng)站相關(guān) >  建站知識(shí) >  APACHE如何在一個(gè)站點(diǎn)綁定多個(gè)域名?

APACHE如何在一個(gè)站點(diǎn)綁定多個(gè)域名?

2015-11-20 15:46:50 2592

    用ServerAlias

    以前很笨,要使多個(gè)域名指向同一站點(diǎn)總是這樣寫:

<VirtualHost *>

    <Directory "D:/vhosts/m.lncdfzh.com.cn">
        Options -Indexes FollowSymLinks
    </Directory>
    ServerAdmin admin@m.lncdfzh.com.cn
    DocumentRoot "D:/vhosts/m.lncdfzh.com.cn"
    ServerName m.lncdfzh.com.cn
    ErrorLog logs/m.lncdfzh.com.cn_log
    php_admin_value open_basedir "D:vhostsm.lncdfzh.com.cn;C:WindowsTemp;"

    <Directory "D:/vhosts/m.lncdfzh.com.cn">
        Options -Indexes FollowSymLinks
    </Directory>
    ServerAdmin admin@m.lncdfzh.com.cn
    DocumentRoot "D:/vhosts/m.lncdfzh.com.cn"
    ServerName m.lncdfzh.com.cn
    ErrorLog logs/m.lncdfzh.com.cn_log
    php_admin_value open_basedir "D:vhostsm.lncdfzh.com.cn;C:WindowsTemp;"

    <Directory "D:/vhosts/m.lncdfzh.com.cn">
        Options -Indexes FollowSymLinks
    </Directory>
    ServerAdmin admin@m.lncdfzh.com.cn
    DocumentRoot "D:/vhosts/m.lncdfzh.com.cn"
    ServerName m.lncdfzh.com.cn
    ErrorLog logs/m.lncdfzh.com.cn_log
    php_admin_value open_basedir "D:vhostsm.lncdfzh.com.cn;C:WindowsTemp;"
</VirtualHost>
這樣一來就等于綁了多少域名就開了多少虛擬主機(jī)…………
后來,發(fā)現(xiàn)有個(gè)叫”ServerAlias“的東西可以用
其實(shí)可以這樣:
<VirtualHost *>
    <Directory "D:/vhosts/m.lncdfzh.com.cn">
        Options -Indexes FollowSymLinks
    </Directory>
    ServerAdmin admin@m.lncdfzh.com.cn                            #管理服務(wù)器的郵箱 一般都不需要填寫
    DocumentRoot "D:/vhosts/m.lncdfzh.com.cn"                     #網(wǎng)站的目錄
    ServerName m.lncdfzh.com.cn                                   #需要綁定的域名
    ServerAlias m.lncdfzh.com.cn m.lncdfzh.com.cn m.lncdfzh.com.cn        #綁定多個(gè)域名
    ErrorLog logs/m.lncdfzh.com.cn_log                      #錯(cuò)誤日志目錄
  php_admin_value open_basedir "D:vhostsm.lncdfzh.com.cn;C:WindowsTemp;" #上傳文件的臨時(shí)目錄.
</VirtualHost>

提交成功!非常感謝您的反饋,我們會(huì)繼續(xù)努力做到更好!

這條文檔是否有幫助解決問題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問題: