<p><em>Some values have been anonimized and are marked with %value%</em></p>
<p>I followed the <a href="https://craftcms.com/docs/3.x/installation.html" rel="nofollow noreferrer">steps</a> for setting up a local Craft CMS using composer and have the default site running on <code>%domain%.test</code>. Now I've made a second site in de admin with the base_url <code>@web/en</code> but whenever I go to <code>%domain%.test/en</code> it shows the following error:</p>
<pre><code>Warning: chdir(): No such file or directory (errno 2) in /Users/%user%/.composer/vendor/weprovide/valet-plus/server.php on line 127

Warning: require(/Users/%user%/www/%domain%/public/en/index.php): failed to open stream: No such file or directory in /Users/%user%/.composer/vendor/weprovide/valet-plus/server.php on line 131

Fatal error: require(): Failed opening required '/Users/%user%/www/%domain%/public/en/index.php' (include_path='.:/usr/local/Cellar/valet-php@7.4/7.4.16/share/valet-php@7.4/pear') in /Users/macbook21/.composer/vendor/weprovide/valet-plus/server.php on line 131
</code></pre>
<p>The strange part for me is it's looking <code>/public</code> instead of the usual <code>/web</code> folder?</p>
<p>Anyone know how to fix this issue? I've checked the documentation but can't find any clues as of why it is not working.</p>
<hr />
<h2>Edit 1</h2>
<p>Config/general.php</p>
<pre><code>&lt;?php
/**
 * General Configuration
 *
 * All of your system's general configuration settings go in here. You can see a
 * list of the available settings in vendor/craftcms/cms/src/config/GeneralConfig.php.
 *
 * @see \craft\config\GeneralConfig
 */

use craft\helpers\App;

$isDev = App::env('ENVIRONMENT') === 'dev';
$isProd = App::env('ENVIRONMENT') === 'production';

return [
    // Default Week Start Day (0 = Sunday, 1 = Monday...)
    'defaultWeekStartDay' =&gt; 1,

    // Whether generated URLs should omit &quot;index.php&quot;
    'omitScriptNameInUrls' =&gt; true,

    // The URI segment that tells Craft to load the control panel
    'cpTrigger' =&gt; App::env('CP_TRIGGER') ?: 'admin',

    // The secure key Craft will use for hashing and encrypting data
    'securityKey' =&gt; App::env('SECURITY_KEY'),

    // Whether Dev Mode should be enabled (see https://craftcms.com/guides/what-dev-mode-does)
    'devMode' =&gt; $isDev,

    // Whether administrative changes should be allowed
    'allowAdminChanges' =&gt; $isDev,

    // Whether crawlers should be allowed to index pages and following links
    'disallowRobots' =&gt; !$isProd,

    // ReCaptcha SiteKey
    'recaptchaSiteKey' =&gt; App::env('RECAPTCHA_SITEKEY'),
];

</code></pre>

CC BY-SA 4.0
2021-07-01T10:23:40.527Z
How is your `@web` alias defined? Can you share your `config/general.php` file? It's probably just a configuration issue.
MoritzLost
CC BY-SA 4.0
2021-07-01T10:31:28.430Z
@moritzLost please see edit, nothing special haven't set up any custom Aliases for `@web` so it should be default. Also any other URL for a entry simply works.
Sander Lameco
CC BY-SA 4.0
2021-07-01T11:05:36.167Z
Hmm, curious ... I'm just noticing that you're using what appears to be an abandoned fork of Laravel Valet. Maybe there's a bug there? You could try updating to the regular Valet by Laravel and see if the error goes away.
MoritzLost
CC BY-SA 4.0
2021-07-01T11:17:44.963Z
@moritzLost well the weird part is, we have another Craft 3 project (made by a third party) that does work locally. But I can't find out what the difference is between the projects. I've checked the config files, web/index.php and craft file.
Sander Lameco
<craft3><localization><multi-site><craft-pro>
Locale URL /en not working - No such file or directory (/public)
# Locale URL /en not working - No such file or directory (/public)

(Asked by: username_0 on 2021-07-01)

Some values have been anonimized and are marked with %value%
I followed the steps for setting up a local Craft CMS using composer and have the default site running on %domain%.test. Now I've made a second site in de admin with the base_url @web/en but whenever I go to %domain%.test/en it shows the following error:
Warning: chdir(): No such file or directory (errno 2) in /Users/%user%/.composer/vendor/weprovide/valet-plus/server.php on line 127

Warning: require(/Users/%user%/www/%domain%/public/en/index.php): failed to open stream: No such file or directory in /Users/%user%/.composer/vendor/weprovide/valet-plus/server.php on line 131

Fatal error: require(): Failed opening required '/Users/%user%/www/%domain%/public/en/index.php' (include_path='.:/usr/local/Cellar/valet-php@7.4/7.4.16/share/valet-php@7.4/pear') in /Users/macbook21/.composer/vendor/weprovide/valet-plus/server.php on line 131

The strange part for me is it's looking /public instead of the usual /web folder?
Anyone know how to fix this issue? I've checked the documentation but can't find any clues as of why it is not working.

Edit 1
Config/general.php
 1,

    // Whether generated URLs should omit "index.php"
    'omitScriptNameInUrls' => true,

    // The URI segment that tells Craft to load the control panel
    'cpTrigger' => App::env('CP_TRIGGER') ?: 'admin',

    // The secure key Craft will use for hashing and encrypting data
    'securityKey' => App::env('SECURITY_KEY'),

    // Whether Dev Mode should be enabled (see https://craftcms.com/guides/what-dev-mode-does)
    'devMode' => $isDev,

    // Whether administrative changes should be allowed
    'allowAdminChanges' => $isDev,

    // Whether crawlers should be allowed to index pages and following links
    'disallowRobots' => !$isProd,

    // ReCaptcha SiteKey
    'recaptchaSiteKey' => App::env('RECAPTCHA_SITEKEY'),
];

**Tags:** craft3, localization, multi-site, craft-pro

> **Comments:**
> **username_1**: How is your `@web` alias defined? Can you share your `config/general.php` file? It's probably just a configuration issue.  
> **username_0**: @moritzLost please see edit, nothing special haven't set up any custom Aliases for `@web` so it should be default. Also any other URL for a entry simply works.  
> **username_1**: Hmm, curious ... I'm just noticing that you're using what appears to be an abandoned fork of Laravel Valet. Maybe there's a bug there? You could try updating to the regular Valet by Laravel and see if the error goes away.  
> **username_0**: @moritzLost well the weird part is, we have another Craft 3 project (made by a third party) that does work locally. But I can't find out what the difference is between the projects. I've checked the config files, web/index.php and craft file.  

---

## 0 answers

