• <span id="uj4z7"><optgroup id="uj4z7"></optgroup></span>

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

      Linux apache 域名綁定方法

      發布日期:2017-10-18 閱讀:6130

      以下配置的路徑以阿里云提供的標準環境路徑為準,如果您另行安裝,請根據實際安裝路徑去找到您的配置文件進行配置。

             假如我們需要在我們的網站www.test.com上增加綁定一個m.test.com和一個test.com的域名,請進行如下類似的操作:

      1.cd /alidata/server/httpd/conf/vhosts/ 找到您的網站配置文件,一般是您的域名.conf,例如域名是:www.test.com,那就應該是www.test.com.conf

       

      2.vim www.test.com.conf  修改這個配置文件,您應該會看到如下類似的配置內容:

      <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”開始編輯文件,輸入內容:

      <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"

      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 綁定的網站域名

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

      DirectoryIndex index.html index.php index.htm 設置默認首頁

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

       

      按“esc”退出編輯模式,輸入“:wq”保存退出。

       

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

       

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


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

      會員評論

      在線客服
      微信咨詢
      微信咨詢
      現在咨詢,獲取演示賬號
      企業logo小米
      立即掃碼加我微信
      電話咨詢
      咨詢電話
      028-61558715
      預約演示
      日韩黄色片网站| 狠狠色综合色区| 国产精品v欧美精品∨日韩| 999在线视频精品免费播放观看| 日韩一区二区三区电影 | 亚洲国产综合精品中文第一区| 看全色黄大色黄女片18女人| 国产亚洲欧美在在线人成| 自拍偷自拍亚洲精品播放| 国产成人午夜片在线观看| chinesefemdom444| 好吊妞精品视频| 中文字幕在线观看| 宝贝过来趴好张开腿让我看看 | 欧美人与动zooz| 午夜老司机福利| 青青国产在线播放| 国产呦系列免费| 补课老师让我cao出水| 国产亚洲婷婷香蕉久久精品| 草草影院第一页| 国产成人19禁在线观看| 黄网站免费观看| 国产精品igao视频| 青青热久免费精品视频精品| 国产乱子伦视频在线观看| 色噜噜狠狠一区二区三区果冻 | 亚洲av无码一区二区三区不卡| 欧美日韩视频在线播放| 免费人成网站在线播放| 男女一边摸一边做爽爽| 国产一区二区精品久久岳| 色噜噜综合亚洲AV中文无码| 四虎影视无码永久免费| 精品国产一区二区三区久| 啊灬用力啊灬啊灬快灬深| 精品剧情v国产在线麻豆| 又粗又长又硬太爽了视频快来| 老司机深夜福利在线观看| 国产三级在线视频播放线| 男女一进一出抽搐免费视频|