CentOS サブドメインが機能しない

CentOS サブドメインが機能しない

CentOSサーバーでサブドメインを作成しようとしていますが、メインドメイン名にリダイレクトされます

これが私の仮想ホストです

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.domain.co.uk
ServerAlias domain.co.uk
DocumentRoot /var/www/html/domain.co.uk/
ErrorLog /var/www/html/domain.co.uk/error.log
CustomLog /var/www/html/domain.co.uk/requests.log combined
<Directory "/var/www/html/domain.co.uk/">
Options FollowSymLinks
AllowOverride All
Options -Indexes
</Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =domain.co.uk [OR]
RewriteCond %{SERVER_NAME} =www.domain.co.uk
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:80>
ServerName www.staging.domain.co.uk
ServerAlias staging.domain.co.uk
DocumentRoot /var/www/html/staging.domain.co.uk/
ErrorLog /var/www/html/staging.domain.co.uk/error.log
CustomLog /var/www/html/staging.domain.co.uk/requests.log combined
<Directory "/var/www/html/staging.domain.co.uk/">
Options FollowSymLinks
AllowOverride All
Options -Indexes
</Directory>
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =staging.domain.co.uk [OR]
#RewriteCond %{SERVER_NAME} =staging.domain.co.uk
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

これを修正するための提案はありますか?

関連情報