首页 > Web开发 > 详细

如何加入该网站for Linux(绑定域名)

时间:2015-07-09 13:03:35      阅读:292      评论:0      收藏:0      [点我收藏+]
【路径跟踪配置由阿里云提供的标准环境的路径为准,假设你单独安装。请根据实际的安装路径配置】。
 
1.cd /alidata/server/httpd/conf/vhosts/ 进入绑定域名所在文件夹。
 
2.vim test.conf  建立一个配置文件。test能够自己命名;
 
3.点击字母“i”開始编辑文件,输入内容:
        DocumentRoot /alidata/www/phpwind
        ServerName localhost
        ServerAlias localhost
       
            Options -Indexes FollowSymLinks
            AllowOverride all
            Order allow,deny
            Allow from all
       
       
                RewriteEngine On
                RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
                RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?

$2

       
        ErrorLog “/alidata/log/httpd/phpwind-error.log”
        CustomLog “/alidata/log/httpd/access/phpwind.log” common
 
 
当中:
ServerName www.test.com 绑定的站点域名
ServerAlias test.com 绑定的站点别名(您假设有多个域名加入在这里)
DirectoryIndex index.html index.php index.htm 设置默认首页
DocumentRoot /alidata/www/test 和 Directory “/alidata/www/test” 都是指定站点的文件夹,须要一致。
 
按“esc”退出编辑模式,输入“:wq”保存退出。

 
4.输入命令:/alidata/server/httpd/bin/apachectl restart 重新启动apache測试。
 
5.測试站点。请在浏览器中输入域名,測试设置。
 

版权声明:本文博客原创文章,博客,未经同意,不得转载。

如何加入该网站for Linux(绑定域名)

原文:http://www.cnblogs.com/gcczhongduan/p/4632800.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!