scxiaoxu
V2EX  ›  Apache

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

  •  
  •   scxiaoxu · Oct 24, 2017 · 3708 views
    This topic created in 3318 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
    tuding
    Oct 24, 2017
    1
    应该是在<VirtualHost>里面配置.
    scxiaoxu
    scxiaoxu
    OP
    Oct 24, 2017
    2
    是的,但是我现在在 vhost 里面配置了没用,这个是我现在配置的
    scxiaoxu
    scxiaoxu
    OP
    Oct 24, 2017
    3
    <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   ·   Privacy   ·   Solana   ·   1822 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 15:54 · PVG 23:54 · LAX 07:54 · JFK 10:54
    ♥ Do have faith in what you're doing.