Press "Enter" to skip to content

apache域名配置优化

一个8年前的站点是php + apache + mysql的,最近发现缺少www前缀的域名访问,访问不了。打开之前的httpd 的配置文件发现

ServerName www.xxx.com:443

ServerAlias cdn.xxx.com:443

配置项没有对应 xxx.com, 调整了一下,用以下配置 更难兼容,之前配置写死了范围窄

ServerName xxx.com:443

ServerAlias *.xxx.com:443

Leave a Reply

Your email address will not be published. Required fields are marked *