Laravel геройку 403 Запрещено

avatar
sheriff123
8 августа 2021 в 22:51
174
0
0

пожалуйста, мне нужна помощь в этом, я пробовал много подходов, прежде чем открыть этот билет здесь, Я успешно развернул свой проект Laravel + Vuejs на Heroku, но проблема в том, что всякий раз, когда я набираю «Heroku Open» или получаю доступ к URL-адресу веб-страницы для загрузки, я получаю следующую ошибку:

 Forbidden
 You don't have permission to access / on this server.

Я не знаю, что не так, это заняло у меня целый день, перепробовал кучу решений,

исходя из моей идеи, проблема, похоже, связана с базовым URL-адресом, потому что в этих журналах он получает «приложение/» вместо «/», но не знаю, как это решить:

2021-08-08T19:52:58.130785+00:00 heroku[web.1]: Starting process with command `heroku-php-apache2`
2021-08-08T19:53:04.801343+00:00 app[web.1]: Detected 536870912 Bytes of RAM
2021-08-08T19:53:04.801555+00:00 app[web.1]: $WEB_CONCURRENCY env var is set, skipping automatic calculation
2021-08-08T19:53:04.891084+00:00 app[web.1]: Starting php-fpm with 1 workers...
2021-08-08T19:53:05.118171+00:00 app[web.1]: Starting httpd...
2021-08-08T19:53:05.494104+00:00 heroku[web.1]: State changed from starting to up
2021-08-08T19:53:06.554198+00:00 app[web.1]: [Sun Aug 08 19:53:06.552879 2021] [autoindex:error] [pid 155:tid 140500526954240] [client 10.181.143.206:17985] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
2021-08-08T19:53:06.554955+00:00 app[web.1]: 10.181.143.206 - - [08/Aug/2021:19:53:06 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T19:53:06.555221+00:00 heroku[router]: at=info method=GET path="/" host=web-movie-apps.herokuapp.com request_id=e8aa02d0-fec2-4169-9d9e-78846c1b62ef fwd="197.210.65.172" dyno=web.1 connect=1ms service=2ms status=403 bytes=363 protocol=https
2021-08-08T19:53:09.770909+00:00 heroku[router]: at=info method=GET path="/" host=web-movie-apps.herokuapp.com request_id=b1358256-684a-459e-b561-d32f7cad74c1 fwd="197.210.65.172" dyno=web.1 connect=1ms service=4ms status=403 bytes=363 protocol=https
2021-08-08T19:53:09.773905+00:00 app[web.1]: [Sun Aug 08 19:53:09.768395 2021] [autoindex:error] [pid 155:tid 140500308846336] [client 10.181.143.206:28717] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
2021-08-08T19:53:09.775233+00:00 app[web.1]: 10.181.143.206 - - [08/Aug/2021:19:53:09 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T19:53:12.108785+00:00 app[web.1]: [Sun Aug 08 19:53:12.106864 2021] [autoindex:error] [pid 156:tid 140500342392576] [client 10.181.143.206:13443] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
2021-08-08T19:53:12.109341+00:00 app[web.1]: 10.181.143.206 - - [08/Aug/2021:19:53:12 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T19:53:12.109698+00:00 heroku[router]: at=info method=GET path="/" host=web-movie-apps.herokuapp.com request_id=4a526ffa-a4f6-4509-90d5-43eac8d427b3 fwd="197.210.65.172" dyno=web.1 connect=7ms service=8ms status=403 bytes=363 protocol=https
2021-08-08T19:54:34.115757+00:00 app[web.1]: [Sun Aug 08 19:54:34.114794 2021] [autoindex:error] [pid 156:tid 140500493391616] [client 10.33.255.116:23938] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive, referer: https://dashboard.heroku.com/
2021-08-08T19:54:34.116197+00:00 heroku[router]: at=info method=GET path="/" host=web-movie-apps.herokuapp.com request_id=cdb70011-f5c3-41a0-9cc3-750c66ccca1d fwd="197.210.65.172" dyno=web.1 connect=1ms service=10ms status=403 bytes=363 protocol=https
2021-08-08T19:54:34.118204+00:00 app[web.1]: 10.33.255.116 - - [08/Aug/2021:19:54:34 +0000] "GET / HTTP/1.1" 403 199 "https://dashboard.heroku.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T20:11:50.045723+00:00 heroku[router]: at=info method=GET path="/" host=web-movie-apps.herokuapp.com request_id=c5582696-1406-49e5-bca6-9667549bb6d3 fwd="197.210.65.172" dyno=web.1 connect=0ms service=4ms status=403 bytes=363 protocol=https
2021-08-08T20:11:50.045913+00:00 app[web.1]: [Sun Aug 08 20:11:50.044793 2021] [autoindex:error] [pid 155:tid 140500292065024] [client 10.91.248.175:24014] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive, referer: https://dashboard.heroku.com/
2021-08-08T20:11:50.046383+00:00 app[web.1]: 10.91.248.175 - - [08/Aug/2021:20:11:50 +0000] "GET / HTTP/1.1" 403 199 "https://dashboard.heroku.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T20:12:13.023457+00:00 app[api]: Starting process with command `npm run watch` by user sheriffjimoh88@gmail.com
2021-08-08T20:12:26.935157+00:00 heroku[run.2559]: State changed from starting to up
2021-08-08T20:12:27.124275+00:00 heroku[run.2559]: Awaiting client
2021-08-08T20:12:27.174614+00:00 heroku[run.2559]: Starting process with command `npm run watch`
2021-08-08T20:15:34.662857+00:00 heroku[run.2559]: Client connection closed. Sending SIGHUP to all processes
2021-08-08T20:15:35.194299+00:00 heroku[run.2559]: Process exited with status 129
2021-08-08T20:15:35.307502+00:00 heroku[run.2559]: State changed from up to complete
2021-08-08T20:16:04.431890+00:00 app[api]: Starting process with command `php artisan clear:cache` by user sheriffjimoh88@gmail.com
2021-08-08T20:16:17.768712+00:00 heroku[run.2032]: State changed from starting to up
2021-08-08T20:16:18.084983+00:00 heroku[run.2032]: Awaiting client
2021-08-08T20:16:18.131486+00:00 heroku[run.2032]: Starting process with command `php artisan clear:cache`
2021-08-08T20:16:23.675213+00:00 heroku[run.2032]: Process exited with status 1
2021-08-08T20:16:23.826413+00:00 heroku[run.2032]: State changed from up to complete
2021-08-08T20:21:25.826786+00:00 app[web.1]: 10.30.43.78 - - [08/Aug/2021:20:21:25 +0000] "GET /public/ HTTP/1.1" 200 679 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T20:21:25.827014+00:00 heroku[router]: at=info method=GET path="/public/" host=web-movie-apps.herokuapp.com request_id=b02f6a4f-74c7-41b1-8153-451a6f36ad89 fwd="197.210.65.172" dyno=web.1 connect=1ms service=424ms status=200 bytes=1766 protocol=http
2021-08-08T20:21:26.170975+00:00 heroku[router]: at=info method=GET path="/public/css/app.css" host=web-movie-apps.herokuapp.com request_id=b76b8a3c-4b2c-43b9-9670-b815f059dd12 fwd="197.210.65.172" dyno=web.1 connect=1ms service=5ms status=304 bytes=196 protocol=https
2021-08-08T20:21:26.172760+00:00 app[web.1]: 10.91.247.19 - - [08/Aug/2021:20:21:26 +0000] "GET /public/css/app.css HTTP/1.1" 304 - "http://web-movie-apps.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T20:21:26.176776+00:00 heroku[router]: at=info method=GET path="/public/js/app.js" host=web-movie-apps.herokuapp.com request_id=fd0d1e7e-4816-44cf-9ec2-9e09d7cbbeec fwd="197.210.65.172" dyno=web.1 connect=0ms service=3ms status=304 bytes=198 protocol=https
2021-08-08T20:21:26.178328+00:00 app[web.1]: 10.91.248.175 - - [08/Aug/2021:20:21:26 +0000] "GET /public/js/app.js HTTP/1.1" 304 - "http://web-movie-apps.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T20:21:33.404671+00:00 app[web.1]: 10.37.174.182 - - [08/Aug/2021:20:21:33 +0000] "GET /public/dashboard HTTP/1.1" 404 196 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T20:21:33.404875+00:00 heroku[router]: at=info method=GET path="/public/dashboard" host=web-movie-apps.herokuapp.com request_id=24db7c64-aea7-46b7-999c-b2411ae896db fwd="197.210.65.172" dyno=web.1 connect=1ms service=3ms status=404 bytes=360 protocol=https
2021-08-08T20:21:44.732633+00:00 app[web.1]: 10.41.171.6 - - [08/Aug/2021:20:21:44 +0000] "GET /public/ HTTP/1.1" 200 679 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T20:21:44.733343+00:00 heroku[router]: at=info method=GET path="/public/" host=web-movie-apps.herokuapp.com request_id=0dca9ec2-64b8-4c11-a993-cddbdd5b504c fwd="197.210.65.172" dyno=web.1 connect=0ms service=24ms status=200 bytes=1766 protocol=https
2021-08-08T20:21:45.212999+00:00 app[web.1]: 10.43.248.213 - - [08/Aug/2021:20:21:45 +0000] "GET /public/js/app.js HTTP/1.1" 200 791915 "https://web-movie-apps.herokuapp.com/public/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T20:21:45.213781+00:00 app[web.1]: 10.41.171.6 - - [08/Aug/2021:20:21:45 +0000] "GET /public/css/app.css HTTP/1.1" 200 2694 "https://web-movie-apps.herokuapp.com/public/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T20:21:45.219659+00:00 heroku[router]: at=info method=GET path="/public/css/app.css" host=web-movie-apps.herokuapp.com request_id=54da465d-cd2b-4363-a122-33221654593e fwd="197.210.65.172" dyno=web.1 connect=5ms service=10ms status=200 bytes=2926 protocol=https
2021-08-08T20:21:45.239069+00:00 heroku[router]: at=info method=GET path="/public/js/app.js" host=web-movie-apps.herokuapp.com request_id=0749ad11-9bf4-406b-9cf1-00ddc3214f41 
fwd="197.210.65.172" dyno=web.1 connect=1ms service=36ms status=200 bytes=792165 protocol=https
2021-08-08T20:30:15.409357+00:00 heroku[router]: at=info method=GET path="/" host=web-movie-apps.herokuapp.com request_id=cd007a36-0975-4dae-9c39-7423e053b155 fwd="197.210.65.172" dyno=web.1 connect=1ms service=6ms status=403 bytes=363 protocol=https

2021-08-08T20:30:15.413801+00:00 app[web.1]: [Sun Aug 08 20:30:15.408003 2021] [autoindex:error] [pid 156:tid 140500073891584] [client 10.61.245.89:10607] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive



2021-08-08T20:30:15.414223+00:00 app[web.1]: 10.61.245.89 - - [08/Aug/2021:20:30:15 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T20:31:10.201322+00:00 app[api]: Starting process with command `bash` by user sheriffjimoh88@gmail.com
2021-08-08T20:31:23.051581+00:00 heroku[run.8150]: State changed from starting to up
2021-08-08T20:31:23.531876+00:00 heroku[run.8150]: Awaiting client
2021-08-08T20:31:23.602416+00:00 heroku[run.8150]: Starting process with command `bash`
2021-08-08T20:43:01.650680+00:00 heroku[run.8150]: Client connection closed. Sending SIGHUP to all processes
2021-08-08T20:43:02.181193+00:00 heroku[run.8150]: Process exited with status 129
2021-08-08T20:43:02.279806+00:00 heroku[run.8150]: State changed from up to complete
2021-08-08T20:53:55.000000+00:00 app[api]: Build started by user sheriffjimoh88@gmail.com
2021-08-08T20:55:24.568982+00:00 app[api]: Deploy c26d28d7 by user sheriffjimoh88@gmail.com
2021-08-08T20:55:24.568982+00:00 app[api]: Release v21 created by user sheriffjimoh88@gmail.com
2021-08-08T20:55:24.949993+00:00 heroku[web.1]: Restarting
2021-08-08T20:55:24.981553+00:00 heroku[web.1]: State changed from up to starting
2021-08-08T20:55:26.257268+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2021-08-08T20:55:26.737172+00:00 app[web.1]: SIGTERM received, attempting graceful shutdown...
2021-08-08T20:55:26.737190+00:00 app[web.1]: Stopping httpd gracefully...
2021-08-08T20:55:28.743896+00:00 app[web.1]: Stopping php-fpm gracefully...
2021-08-08T20:55:28.767627+00:00 app[web.1]: Shutdown complete.
2021-08-08T20:55:28.882070+00:00 heroku[web.1]: Process exited with status 143
2021-08-08T20:55:33.000000+00:00 app[api]: Build succeeded
2021-08-08T20:55:46.827984+00:00 heroku[web.1]: Starting process with command `heroku-php-apache2`
2021-08-08T20:55:52.766687+00:00 app[web.1]: Detected 536870912 Bytes of RAM
2021-08-08T20:55:52.767021+00:00 app[web.1]: $WEB_CONCURRENCY env var is set, skipping automatic calculation
2021-08-08T20:55:52.792667+00:00 app[web.1]: Starting php-fpm with 1 workers...
2021-08-08T20:55:53.006803+00:00 app[web.1]: Starting httpd...
2021-08-08T20:55:53.616359+00:00 heroku[web.1]: State changed from starting to up
2021-08-08T21:08:48.852345+00:00 heroku[router]: at=info method=GET path="/" host=web-movie-apps.herokuapp.com request_id=6b967515-a0d1-4ba8-b85f-3b8864db1c91 fwd="197.210.65.172" dyno=web.1 connect=49ms service=24ms status=403 bytes=363 protocol=https
2021-08-08T21:08:48.857646+00:00 app[web.1]: [Sun Aug 08 21:08:48.851649 2021] [autoindex:error] [pid 154:tid 140063094515456] [client 10.87.5.162:31917] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
2021-08-08T21:08:48.858413+00:00 app[web.1]: 10.87.5.162 - - [08/Aug/2021:21:08:48 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T21:43:21.040514+00:00 heroku[web.1]: Idling
2021-08-08T21:43:21.042252+00:00 heroku[web.1]: State changed from up to down
2021-08-08T21:43:22.639082+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2021-08-08T21:43:22.848828+00:00 app[web.1]: SIGTERM received, attempting graceful shutdown...
2021-08-08T21:43:22.849486+00:00 app[web.1]: Stopping httpd gracefully...
2021-08-08T21:43:23.878803+00:00 app[web.1]: Stopping php-fpm gracefully...
2021-08-08T21:43:23.935505+00:00 app[web.1]: Shutdown complete.
2021-08-08T21:43:24.046722+00:00 heroku[web.1]: Process exited with status 143
2021-08-08T22:05:07.177640+00:00 heroku[web.1]: Unidling
2021-08-08T22:05:07.247353+00:00 heroku[web.1]: State changed from down to starting
2021-08-08T22:05:21.255462+00:00 heroku[web.1]: Starting process with command `heroku-php-apache2`
2021-08-08T22:05:27.292411+00:00 app[web.1]: Detected 536870912 Bytes of RAM
2021-08-08T22:05:27.295436+00:00 app[web.1]: $WEB_CONCURRENCY env var is set, skipping automatic calculation
2021-08-08T22:05:27.395298+00:00 app[web.1]: Starting php-fpm with 1 workers...
2021-08-08T22:05:27.672321+00:00 app[web.1]: Starting httpd...
2021-08-08T22:05:28.021012+00:00 heroku[web.1]: State changed from starting to up
2021-08-08T22:05:29.384483+00:00 heroku[router]: at=info method=GET path="/" host=web-movie-apps.herokuapp.com request_id=4b3f3326-a21c-4260-9bfe-7d620a573cb3 fwd="197.210.65.172" dyno=web.1 connect=1ms service=2ms status=403 bytes=363 protocol=https
2021-08-08T22:05:29.385926+00:00 app[web.1]: [Sun Aug 08 22:05:29.384718 2021] [autoindex:error] [pid 155:tid 139826509567744] [client 10.65.93.89:33808] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
2021-08-08T22:05:29.388073+00:00 app[web.1]: 10.65.93.89 - - [08/Aug/2021:22:05:29 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T22:05:30.765848+00:00 app[web.1]: 10.181.54.2 - - [08/Aug/2021:22:05:30 +0000] "GET /favicon.ico HTTP/1.1" 404 196 "https://web-movie-apps.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
2021-08-08T22:05:30.766722+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=web-movie-apps.herokuapp.com request_id=c5ce993b-dda1-41ef-ab38-de349f80789e fwd="197.210.65.172" dyno=web.1 connect=0ms service=1ms status=404 bytes=360 protocol=https

у меня есть .htaccess таким образом:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
    DirectoryIndex  index.php
</IfModule>

Как выглядит мой Procfile:

web: vendor/bin/heroku-php-apache2 public/

Мой composer.json:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "php": "^7.3|^8.0",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.40",
        "laravel/tinker": "^2.5",
        "laravel/ui": "^3.3"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3",
        "heroku/heroku-buildpack-php" : "dev-master"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ],
        "post-install-cmd": [
            "php artisan clear-compiled",
            "chmod -R 777 public/"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

Я также создал переменные среды, APP_URL и тому подобное.

Проект на Laravel и vuejs, но странно то, что если доступ через

https://web-movie-apps.herokuapp.com/public/ он отобразит домашнюю страницу по умолчанию, но загрузит несколько CSS, а не все.

Источник
matiaslauriti
9 августа 2021 в 01:04
0

Он явно не использует public в качестве DocumentRoot по умолчанию. Я не использовал Heroku, но здесь находится "учебник". Кроме того, будьте осторожны, поскольку ваш код javascript пытается получить доступ к http://localhost:3000/api/category и movie вместо вашего корневого адреса... кроме того, ваш .htaccess не находится в public? Если да, то почему в этом файле DirectoryIndex index.php? Удалите это...

Ответы (0)