在cloudflare中创建的子域指向主站点

时间:2019-01-08 02:29:42

标签: php laravel apache https cloudflare

我在cloudflare上设置了一个子域

类型:CNAME 名称:子域 值:domain.com TTL:自动 状态:橙云

subdomain.conf

<VirtualHost *:80>
    ServerName subdomain.domain.com
    ServerAlias www.subdomain.domain.com
</VirtualHost>
<VirtualHost *:443>
        ServerName subdomain.domain.com
        ServerAlias www.subdomain.domain.com
    ServerAdmin admin@domain.com
    DocumentRoot /var/www/html/laravel/public
    SSLEngine On
    SSLCertificateFile     /home/certificates/domain.com.pem
    SSLCertificateKeyFile  /home/certificates/domain.com.key
    <Directory /var/www/html/laravel/public>
        Options Indexes FollowSymLinks
        AllowOverride all
        Allow from all
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</Virtualhost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

the following config points to main site and I am not sure what i am doing wrong.

0 个答案:

没有答案