Drupal 7 在Drupal 7中创建虚拟主机后,主屏幕不会出现

Drupal 7 在Drupal 7中创建虚拟主机后,主屏幕不会出现,drupal-7,virtualhost,Drupal 7,Virtualhost,我使用MAMP在电脑中安装Drupal 7.56安装完成后,drupal管理屏幕出现 然后,我创建了名为“cast.dev”的虚拟主机。 当我在浏览器中键入“cast.dev”时,它不显示任何内容,只显示“Itworks!” 我还创建了一个头版。它也不显示

我使用MAMP在电脑中安装Drupal 7.56
安装完成后,drupal管理屏幕出现


然后,我创建了名为“cast.dev”的虚拟主机。 当我在浏览器中键入“cast.dev”时,它不显示任何内容,只显示“Itworks!”


我还创建了一个头版。它也不显示<谁能告诉我我还需要做哪些工作?谢谢。

尝试添加以下内容

<VirtualHost *:80>
  ServerName myproject.local
  ServerAdmin webmaster@localhost
  DocumentRoot /home/user/path/to/myproject_folder
  <Directory /home/user/path/to/myproject_folder>
    Require all granted
    AllowOverride All
  </Directory>
  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
通过在“etc”中的“hosts”文件上添加以下代码来设置localhost文件

127.0.0.1 myproject.local
为此,请使用gedit和以下命令编辑主机:

sudo gedit /etc/hosts

这里显示的是localhost页面。如何配置虚拟主机?
sudo gedit /etc/hosts