cdwyer
cdwyer

Reputation: 697

XAMPP Ignores Document Root; Redirects to 'localhost/dashboard'

I have two computers, a laptop & desktop, with seemingly identical setups:

On the laptop, everything works as expected; visiting localhost in Chrome hits Laravel's public folder and the application fires up like it should. On the desktop, however, I get redirected to localhost/dashboard when I visit localhost. Typing out the full address (ie, localhost/site-folder/public) works, but all links are broken, as they expect the site-folder/public directory to be the root.

My assumption—and I hope I'm wrong about this—is that there are a lot of potential configuration settings that might be off. Any ideas on what might cause this, or how to go about debugging? Thanks in advance for any thoughts/suggestions!

Upvotes: 1

Views: 2372

Answers (1)

cdwyer
cdwyer

Reputation: 697

This turned out to be the result of middleware I had in place, which required a secure connection. The middleware worked fine/as expected, but the httpd-ssl.conf file needed the updated project path. In case somebody else is experiencing a similar problem, try this:

  • Find the comment # General setup for the virtual host
  • Change DocumentRoot to the same project path used in your httpd.conf

Appreciate all comments on the original question!

Upvotes: 4

Related Questions