1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Laravel】【mac】ドキュメントルートにしかアクセスできない

Posted at

#環境
macOS Catalina 10.15.7

$ apachectl -v
Server version: Apache/2.4.41 (Unix)
$ php artisan --version
Laravel Framework 6.20.12

#事象
ドキュメントルート以外のページにアクセスできない。
(404 Not Foundとなる)

#解決策

$ sudo vim /etc/apache2/httpd.conf
~
LoadModule rewrite_module libexec/apache2/mod_rewrite.so ->このコメントアウトを外す
~
$ sudo apachectl restart

これだけで治りました。

ご参考:https://qiita.com/u-akihiro/items/c7a5bb38c34858d00c2a
Ubuntu版のご投稿ですが、内容はほぼ一緒です。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?