我已经从linode.com购买了一台服务器,并使用我从namecheap购买的域进行了设置。设置DNS的工作符合预期,我遵循了linode的官方文档。
但是,尽管我遵循相同的文档,但是无论何时尝试在同一服务器中设置子域,出于某种原因我都无法设置它。
这是配置: 服务器:Ubuntu 18.04上的Apache 域: randomxyz.xyz
这是我遵循的步骤:
IP -> Server IP.
Hostname -> temp.
# domain: randomxyz.xyz
# public: /var/www/html/randomxyz.xyz/public_html/
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin ok@randomxyz.xyz
ServerName temp.randomxyz.xyz
ServerAlias temp.randomxyz.xyz
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /var/www/html/temp.randomxyz.xyz/public_html
# Log file locations
LogLevel warn
ErrorLog /var/www/html/temp.randomxyz.xyz/log/error.log
CustomLog /var/www/html/temp.randomxyz.xyz/log/access.log combined
</VirtualHost>
我已经等待了48个小时以上。子域无法正常工作。
我在这里想念什么? 我必须在namecheap管理器中做什么吗?