プログラミング初心者です。
すでに別のLaravelアプリが動いているApacheサーバー上で、別ディレクトリにもうひとつLaravelアプリを構築したいと思っています。
下記のような構成です。
- 既存アプリ → /var/www/html/project_name/Laravel
- 新規アプリ → /var/www/project_name/project(DockerFileなどを含む)/Laravel
元々のドキュメントルートが/var/www/htmlに設定されており、これを下記のように変更したのですが、既存アプリ(/var/www/html配下の方)が変わらず表示されてしまい困っております。
(編集したのは/etc/httpd/conf/httpd.confです)
・(略) ・ ・# DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/var/www/project_name" # # Relax access to content within /var/www. # <Directory "/var/www/project_name"> ・(略) ・ ・ # Further relax access to the default document root: <Directory "/var/www/project_name">
やったこと
- ドキュメントルートを/var/www/project_name/project(DockerFileなどを含む)/Laravel/publicに変更
- systemctl restart httpd で再起動
- ブラウザキャッシュの削除
- AllowOverrideをAllに設定↓
・(略) ・ ・ # Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # <Directory> blocks below. # <Directory /> AllowOverride All Require all granted </Directory> ・(略) ・ ・ # # Relax access to content within /var/www. # <Directory "/var/www/project_name"> AllowOverride All # Allow open access: Require all granted </Directory>
上記では状況変わりませんでした。
やり方おかしいところや試すべきことご指導いただけますと幸いです。
何卒よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー