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

Linux apache 域名綁定方法

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

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

       假如我們需要在我們的網站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
預約演示
主站蜘蛛池模板: 快点使劲舒服爽视频| 秋霞日韩一区二区三区在线观看 | 韩国免费一级成人毛片| 国产精品自产拍在线观看| z0z0z0女人极品另类视频| 日韩大片观看网址| 亚洲国产精品无码专区在线观看| 狠狠色噜噜狠狠狠狠网站视频| 午夜无码国产理论在线| 青青热久久久久综合精品 | 欧美综合自拍亚洲综合图| 加勒比色综合久久久久久久久| 亚洲精品无码久久毛片| 色噜噜狠狠色综合欧洲| 国产成人a毛片在线| 3300章极致易天下完整| 天天干天天射天天操| 中国大白屁股ass| 日韩电影免费在线观看中文字幕 | 国色天香精品一卡2卡3卡| yy6080午夜一级毛片超清| 成人福利视频导航| 久久精品视频网站| 樱花草在线社区www韩国| 亚洲日产韩国一二三四区| 爱看精品福利视频观看| 免费看的一级毛片| 美女一级毛片免费看看| 国产一级做a爱片久久毛片a| 高潮毛片无遮挡高清免费视频| 国产熟睡乱子伦午夜视频| 2020求一个网站男人都懂| 欧美freesex黑人又粗超长| 亚洲电影在线播放| 特级淫片aaaa**毛片| 全彩本子acg里番本子| 精品在线视频免费| 国产69精品久久久久9999apgf| 18videosex性欧美69| 国语自产拍天天在线| [中文][3d全彩]舞房之夜|