zoukankan      html  css  js  c++  java
  • 如何加入该网站for Linux(绑定域名)

    【路径跟踪配置由阿里云提供的标准环境的路径为准,假设你单独安装。请根据实际的安装路径配置】。
     
    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.測试站点。请在浏览器中输入域名,測试设置。
     

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

  • 相关阅读:
    重装window7系统(使用U盘)
    冒泡排序
    使用jad进行反编译.class文件生成.java
    java代码编写1+2+3+....+100之和
    springboot多模块项目不同模块组件不能@autowired问题
    django CBV和FBV写法总结
    django cookie与session组件
    djjango cookie和session 的几种常用需求使用方法
    django 一个关于分组查询的问题分析
    Django book manage system
  • 原文地址:https://www.cnblogs.com/gcczhongduan/p/4632800.html
Copyright © 2011-2022 走看看