Is the public folder of laravel framework in mac inaccessible?

Source: Internet
Author: User
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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.