Valet: 404 when going on "localhost"

Created on 24 Mar 2019  路  2Comments  路  Source: laravel/valet

Hi everyone,
Back again with a small issue here.

My sub domains are working good, for example :

  • | betcms | | http://betcms.test | /Users/anthony/Sites/betcms/public |
  • | blog | | http://blog.test | /Users/anthony/Sites/blog |
    But, i cannot reach my /Users/anthony/Sites/ folder by typing "localhost" in my browser.
    This was working before ...

Already tried to do a valet park in the Sites folder and ... nothing.
Tried also to restart all brew services and ... nothing.
If someone have the answer ... !

Thanks everyone ! And have a good Sunday.

Most helpful comment

i cannot reach my /Users/anthony/Sites/ folder by typing "localhost" in my browser.

I'm assuming that 'by typing "localhost" in my browser' you're expecting it to display a list of subdirectories from your Sites folder?
That's not a feature of Valet.

But you could add it yourself using something like was proposed here:
https://github.com/laravel/valet/issues/610#issuecomment-417112280

Alternatively, if you want a "default" site which Valet will open (as a site, not as a list of folders) when you hit localhost, you can add that site's directory to an (undocumented I think) default key in your ~/.config/valet/config.json. (Again, this is a site, not a list of folders):

{
    "paths": [
        "/Users/me/.config/valet/Sites",
        "/Users/me/Sites"
    ],
    "default": "/Users/me/Sites/home/app",
    "tld": "test"
}

All 2 comments

i cannot reach my /Users/anthony/Sites/ folder by typing "localhost" in my browser.

I'm assuming that 'by typing "localhost" in my browser' you're expecting it to display a list of subdirectories from your Sites folder?
That's not a feature of Valet.

But you could add it yourself using something like was proposed here:
https://github.com/laravel/valet/issues/610#issuecomment-417112280

Alternatively, if you want a "default" site which Valet will open (as a site, not as a list of folders) when you hit localhost, you can add that site's directory to an (undocumented I think) default key in your ~/.config/valet/config.json. (Again, this is a site, not a list of folders):

{
    "paths": [
        "/Users/me/.config/valet/Sites",
        "/Users/me/Sites"
    ],
    "default": "/Users/me/Sites/home/app",
    "tld": "test"
}

Thanks doctor ! 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pmochine picture pmochine  路  5Comments

marianvlad picture marianvlad  路  5Comments

eberkund picture eberkund  路  4Comments

TimOgilvy picture TimOgilvy  路  3Comments

sadhakbj picture sadhakbj  路  3Comments