试图将其放在我的httpd.conf中:
<VirtualHost *:80>
ServerAdmin administrator@domain.com
DocumentRoot "/opt/lampp/htdocs"
ServerName domain.com
ServerAlias www.domain.com
ErrorLog "logs/domain.com-error_log"
CustomLog "logs/domain.com-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin administrator@domain.com
DocumentRoot "/opt/lampp/tracker"
ServerName tracker.domain.com
ErrorLog "logs/tracker.domain.com-error_log"
CustomLog "logs/tracker.domain.com-access_log" common
</VirtualHost>
然后将唯一的index.php放在/ htdocs和/ tracker中,当访问tracker.domain.com时,我看到domain.com的index.php不是子域,我已经完成了DNS记录并托管了文件也取消对包含行的注释。任何帮助表示感谢,谢谢!