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

Linux apache 域名綁定方法

發(fā)布日期:2017-10-18 閱讀:6282

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

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

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

 

2.vim www.test.com.conf  修改這個配置文件,您應(yīng)該會看到如下類似的配置內(nèi)容:

<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”開始編輯文件,輸入內(nè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 綁定的網(wǎng)站域名

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

DirectoryIndex index.html index.php index.htm 設(shè)置默認首頁

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

 

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

 

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

 

5.測試網(wǎng)站。請在瀏覽器中輸入域名,測試設(shè)置。


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

會員評論

在線客服
微信咨詢
微信咨詢
現(xiàn)在咨詢,獲取演示賬號
企業(yè)logo小米
立即掃碼加我微信
電話咨詢
咨詢電話
028-61558715
預(yù)約演示
主站蜘蛛池模板: 亚洲视频免费在线看| 老公和他朋友一块上我可以吗| 被公侵幕岬奈奈美中文字幕 | 777奇米影视视频在线播放| 老妇高潮潮喷到猛进猛出| 欧美精品高清在线观看| 日本乱偷人妻中文字幕| 国模精品一区二区三区| 中文无码久久精品| 1000部啪啪毛片免费看| 美国大片免费收看| 欧美www网站| 天堂网在线最新版www| 国产又爽又黄无码无遮挡在线观看| 亚洲色偷偷综合亚洲av伊人| 久久国产精品鲁丝片| 69性欧美高清影院| 精品哟哟哟国产在线观看不卡| 欧美丰满熟妇xx猛交| 好吊日在线观看| 国产免费怕怕免费视频观看| 亚洲欧美日韩国产精品专区| 中国一级特黄特级毛片| 国产曰批免费视频播放免费s| 激情综合色综合久久综合| 护士撩起裙子让你桶的视频| 国产欧美日韩精品专区| 亚洲精品视频专区| 中国一级淫片aaa毛片毛片| 香蕉大战欧美在线看黑人| 欧美人与动人物姣配xxxx| 天天操天天射天天操| 喝丰满女医生奶水电影| 久久精品久久久| 青青青手机视频| 激情内射亚洲一区二区三区爱妻 | 日韩美女拍拍免费视频网站| 国产麻豆流白浆在线观看| 免费高清在线观看| 久久久久久亚洲精品| 成人在线手机视频|