To resolve the issue of Herd not finding your non-Laravel site, you need to ensure that Herd (and by extension, Valet) is properly configured to recognize and serve your new directory. Here are the steps you can follow to troubleshoot and fix the issue:
-
Ensure Herd is Running: Make sure that Herd is running. You can start Herd by running:
herd start -
Link the Directory: You need to link your new directory to Valet. Navigate to the parent directory where your
dwdfolder is located and run:cd /path/to/parent-directory valet link dwdThis command will create a symbolic link in Valet's configuration, pointing to your
dwddirectory. -
Check the Directory Structure: Ensure that your
dwddirectory has anindex.phpfile. The structure should look something like this:/path/to/parent-directory └── dwd └── index.php -
Verify Valet Configuration: Make sure that Valet is configured to serve the directory. You can check the linked directories by running:
valet linksYou should see an entry for
dwd. -
Restart Valet: Sometimes, restarting Valet can resolve issues. Run:
valet restart -
Check for Conflicts: Ensure there are no conflicting configurations or other services running on port 80 that might interfere with Valet.
-
Access the Site: Open your browser and navigate to
http://dwd.test. If everything is set up correctly, you should see the output of yourindex.phpfile.
Here is a simple index.php file for testing:
<?php
echo "Hello, Herd!";
By following these steps, you should be able to get Herd to recognize and serve your non-Laravel site. If you still encounter issues, you might want to check the Herd and Valet logs for any error messages that could provide more insight into the problem.