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.測试站点。请在浏览器中输入域名,測试设置。
     

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

  • 相关阅读:
    安装VMWare tools 及安装后/mnt中有hgfs但没共享文件的解决办法
    linux挂载命令
    RHEL7/CentOS7 Network Service开机无法启动的解决方法
    linux消息队列编程实例
    Linux进程间通信——使用消息队列
    消息队列函数
    ipcs查看消息队列命令
    linux批量删除
    HTTP 请求消息头部实例:
    drf 序列化组件
  • 原文地址:https://www.cnblogs.com/gcczhongduan/p/4632800.html
Copyright © 2011-2022 走看看