Estou tentando criar um subdomínio no meu servidor CentOS, mas ele está redirecionando para o nome de domínio principal
Aqui está meu host virtual
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>
Alguma sugestão de como consertar isso?