scxiaoxu
V2EX  ›  Apache

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

  •  
  •   scxiaoxu · Oct 24, 2017 · 3534 views
    This topic created in 3184 days ago, the information mentioned may be changed or developed.

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

    3 replies    2017-10-24 13:19:52 +08:00
    tuding
        1
    tuding  
       Oct 24, 2017
    应该是在<VirtualHost>里面配置.
    scxiaoxu
        2
    scxiaoxu  
    OP
       Oct 24, 2017
    是的,但是我现在在 vhost 里面配置了没用,这个是我现在配置的
    scxiaoxu
        3
    scxiaoxu  
    OP
       Oct 24, 2017
    <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>
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5835 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 06:06 · PVG 14:06 · LAX 23:06 · JFK 02:06
    ♥ Do have faith in what you're doing.