Ich versuche, eine Subdomäne auf meinem CentOS-Server zu erstellen, aber sie leitet auf den Hauptdomänennamen um
Hier ist mein virtueller Host
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>
Irgendwelche Vorschläge, wie man das beheben kann?