In a Mac environment, use the installation package to directly deploy laravel and access the laravel folder through a browser. The file list is displayed, but the public folder is not displayed in the browser. Enter the address directly in the address bar. laravelpublic, the following error occurs: ForbiddenYoudon & #039; thavepermissiont... in a Mac environment, use the installation package to directly deploy laravel and access the laravel folder through a browser. The file list is displayed, but the public folder is not displayed in the browser. Enter the address directly in the address bar. /laravel/public/, an error is returned:
Forbidden
You don't have permission to access /~ Jnwb/laravel/public/on this server.
The rewrite module in apache is enabled.
The vhosts. conf configuration is as follows:
ServerAdmin webmaster@dummy-host.example.comDocumentRoot "/usr/docs/dummy-host.example.com"ServerName dummy-host.example.comServerAlias www.dummy-host.example.comErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log"CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common
ServerAdmin webmaster@dummy-host2.example.comDocumentRoot "/usr/docs/dummy-host2.example.com"ServerName dummy-host2.example.comErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common
Help!
Reply content:
In a Mac environment, use the installation package to directly deploy laravel and access the laravel folder through a browser. The file list is displayed, but the public folder is not displayed in the browser. Enter the address directly in the address bar. /laravel/public/, an error is returned:
Forbidden
You don't have permission to access /~ Jnwb/laravel/public/on this server.
The rewrite module in apache is enabled.
The vhosts. conf configuration is as follows:
ServerAdmin webmaster@dummy-host.example.comDocumentRoot "/usr/docs/dummy-host.example.com"ServerName dummy-host.example.comServerAlias www.dummy-host.example.comErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log"CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common
ServerAdmin webmaster@dummy-host2.example.comDocumentRoot "/usr/docs/dummy-host2.example.com"ServerName dummy-host2.example.comErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common
Help!
Laravel uses the public directory as the root directory of the service by default. public should not appear in your URL. For example, if you want to access/public/static/css/style.css, your URL address is http: // domain/static/css/style.css
Isn't it a permission issue? Change the folder permission?