# http://www.anmp.net
# name: httpd-default.conf


# For Apache_2.2
<IfVersion <= 2.3>
    NameVirtualHost *:80
    NameVirtualHost *:8080

    <Directory "{$ANMP_ROOT}/www">
        Options Indexes FollowSymLinks
        AllowOverride all
        Order allow,deny
        Allow from all
    </Directory>

    <IfVersion >= 2.5>
        <Directory "{$ANMP_HTDOCS}">
            Options Indexes FollowSymLinks
            AllowOverride all
            Order allow,deny
            Allow from all
        </Directory>
    </IfVersion>
</IfVersion>

# For Apache_2.4
<IfVersion >= 2.3>
    <Directory "{$ANMP_ROOT}/www">
        Options Indexes FollowSymLinks
        AllowOverride all
        Require all granted
    </Directory>

    <IfVersion >= 2.5>
        <Directory "{$ANMP_HTDOCS}">
            Options Indexes FollowSymLinks
            AllowOverride all
            Require all granted
        </Directory>
    </IfVersion>
</IfVersion>


# 默认站点
# http://www.anmp.net
# http://127.0.0.1:80
# http://127.0.0.1:8080
<VirtualHost *:80 *:8080 *:443>
    ServerName   www.anmp.net

    # SSLEngine on
    # SSLSessionCache 	    "dbm:logs/ssl_scache"
    # SSLCertificateFile    "D:/Anmp/conf/nginx-ssl/net.anmp.crt"
    # SSLCertificateKeyFile "D:/Anmp/conf/nginx-ssl/net.anmp.key"
    # SSLCACertificateFile  "D:/Anmp/conf/nginx-ssl/anmp-ca.crt"

    DocumentRoot "{$ANMP_ROOT}/www/box"
    ErrorLog     "{$ANMP_ROOT}/data/logs/net.anmp-error.log"
    CustomLog    "{$ANMP_ROOT}/data/logs/net.anmp-access.log" common
    php_admin_value open_basedir "{$ANMP_ROOT}/data/temp;{$ANMP_ROOT}/www/box;X:/Apache"

	RewriteEngine On
	RewriteCond %{HTTP_HOST} ^anmp.net$ [NC]
	RewriteRule ^/(.*)$ http://www.anmp.net/$1 [L,R=302]
</VirtualHost>

# http://adm.anmp.net
<VirtualHost *:80 *:8080>
    ServerName   adm.anmp.net
    DocumentRoot "{$ANMP_ROOT}/www/adm"
    ErrorLog     "{$ANMP_ROOT}/data/logs/net.anmp-error.log"
    CustomLog    "{$ANMP_ROOT}/data/logs/net.anmp-access.log" common
    php_admin_value open_basedir "{$ANMP_ROOT}/data/temp;{$ANMP_ROOT}/www/adm"
</VirtualHost>


# END