V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
scxiaoxu
V2EX  ›  Apache

线上正式环境中的 apache 怎么配置

  •  
  •   scxiaoxu · 2017-10-24 13:06:21 +08:00 · 2818 次点击
    这是一个创建于 2347 天前的主题,其中的信息可能已经有所发展或是发生改变。

    请问线上环境中的 apache 怎么配置啊,比如我 a.com 访问默认 www 目录,我想做个二级域名 a.a.com 访问 a 目录,现在二级域名已经解析到服务器了,我 apache 怎么配置啊,求指点

    3 条回复    2017-10-24 13:19:52 +08:00
    tuding
        1
    tuding  
       2017-10-24 13:12:37 +08:00
    应该是在<VirtualHost>里面配置.
    scxiaoxu
        2
    scxiaoxu  
    OP
       2017-10-24 13:18:54 +08:00
    是的,但是我现在在 vhost 里面配置了没用,这个是我现在配置的
    scxiaoxu
        3
    scxiaoxu  
    OP
       2017-10-24 13:19:52 +08:00
    <VirtualHost *:8081>

    ServerAdmin [email protected]

    DocumentRoot "${SRVROOT}/htdocs/wechat"

    ServerName gongzhonghao.tcgames.vip

    ErrorLog "logs/gongzhonghao.log"

    CustomLog "logs/gongzhonghao.log" common

    <Directory "${SRVROOT}/htdocs/wechat">
    Options -Indexes +FollowSymLinks +ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
    </Directory>

    </VirtualHost>
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5494 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 08:26 · PVG 16:26 · LAX 01:26 · JFK 04:26
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.