国产精品久久久久久久久久,国产午夜视频在线观看,中文字幕av久久爽av蜜月交换,夜夜高潮夜夜爽国产伦精品,国产特级毛片AAAAAAA高清

購物車中還沒有商品,趕緊選購吧!

Linux apache 域名綁定方法

發布(bu)日期(qi):2017-10-18 閱讀:6251

以(yi)下配置的路徑以(yi)阿里(li)云提供的標準環境路徑為準,如果您另行(xing)安(an)裝,請根據實際安(an)裝(zhuang)路徑去找(zhao)到(dao)您(nin)的配置(zhi)文(wen)件進行配置。

       假如我們需(xu)要在我們的網站(zhan)和一個test.com的域名,請進行如下類似的操作:

1.cd /alidata/server/httpd/conf/vhosts/ 找到您(nin)的(de)網站(zhan)配(pei)置文(wen)件,一(yi)般是您(nin)的(de)域名.conf,例(li)如域名是:,那就應該是

 

2.vim  修(xiu)改這個配(pei)置文件,您應該(gai)會看到如下(xia)類似的配(pei)置內容:

<VirtualHost *:80>

DocumentRoot /www/web/www_test_com/public_html

ServerName www.test.com

ServerAlias

DirectoryIndex index.php

ErrorDocument 400 /errpage/400.html

ErrorDocument 403 /errpage/403.html

ErrorDocument 404 /errpage/404.html

CustomLog "/www/web_logs/www.test.com_access_log" common

ErrorLog "/www/web_logs/www.test.com_error_log"

php_admin_value open_basedir /www/web/www_test_com:/tmp

<IfModule mod_deflate.c>

DeflateCompressionLevel 7

AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php

AddOutputFilter DEFLATE css js html htm gif jpg png bmp php

</IfModule>

</VirtualHost>

<Directory /www/web/www_test_com>

    Options FollowSymLinks

    AllowOverride All

    Order allow,deny

    Allow from all

</Directory>

 

3.點擊字母“i”開始編輯文件,輸入(ru)內容:

<VirtualHost *:80>

DocumentRoot /www/web/www_test_com/public_html

ServerName www.test.com

ServerAlias test.com m.test.com

DirectoryIndex index.php

ErrorDocument 400 /errpage/400.html

ErrorDocument 403 /errpage/403.html

ErrorDocument 404 /errpage/404.html

CustomLog "/www/web_logs/www.test.com_access_log" common

ErrorLog "/www/web_logs/www.test.com_error_log&quot;

php_admin_value open_basedir /www/web/www_test_com:/tmp

<IfModule mod_deflate.c>

DeflateCompressionLevel 7

AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php

AddOutputFilter DEFLATE css js html htm gif jpg png bmp php

</IfModule>

</VirtualHost>

<Directory /www/web/www_test_com>

    Options FollowSymLinks

    AllowOverride All

    Order allow,deny

    Allow from all

</Directory>

 

其中:

ServerName www.test.com 綁定(ding)的網站(zhan)域名

ServerAlias test.com m.test.com 綁(bang)定的(de)網站(zhan)別名(您如果(guo)有多個(ge)域名添加(jia)在這里)

DirectoryIndex index.html index.php index.htm 設(she)置默認首頁(ye)

DocumentRoot /www/web/www_test_com/public_html 和(he) Directory "/www/web/www_test_com/public_html " 都是指定網站的目(mu)錄,需要一(yi)致。

 

按“esc”退(tui)出(chu)編輯(ji)模(mo)式,輸入“:wq”保存退(tui)出(chu)。

 

4.輸入命令:/alidata/server/httpd/bin/apachectl restart 重啟apache測試。

 

5.測試(shi)網站。請在瀏(liu)覽器中輸入域名,測試(shi)設(she)置。


以上內容是否對您有幫助? 您的反饋信息提交成功,謝謝您的反饋!

會員評論

在線客服
微信咨詢(xun)
微信咨詢
現在咨詢,獲取演示賬號
企業logo小米
立即掃碼加我微信
電話咨(zi)詢
咨詢電話
028-61558715
預約演示