I’m using Laravel Backpack, with basset helper, in docker container using Laradock on my localhost server.
Now, the basset helper is outputing wrong urls when linking to resources outside of storage (base_path resources to be exact)
here’s an example:
http://localhost/var/www/vendor/backpack/crud/src/resources/assets/css/common.css
when it should be:
http://localhost/storage/basset/vendor/backpack/crud/src/resources/assets/css/common.css
Here’s my nginx conf:
`server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
# For https
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server ipv6only=on;
# ssl_certificate /etc/nginx/ssl/default.crt;
# ssl_certificate_key /etc/nginx/ssl/default.key;
server_name localhost;
root /var/www/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ .php$ {
try_files $uri /index.php =404;
fastcgi_pass php-upstream;
fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fixes timeouts
fastcgi_read_timeout 600;
include fastcgi_params;
}
location ~ /.ht {
deny all;
}
location /.well-known/acme-challenge/ {
root /var/www/letsencrypt/;
log_not_found off;
}
}`
A sample of my .env in laravel:
APP_NAME='App' APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost LOG_CHANNEL=stack
It’s a very basic install. Of course I’ve tried to clear cache and config and basset. Also, This is the output of php artisan basset:check
:
ERROR cURL error 7: Failed to connect to localhost port 80: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost/storage/basset/vendor/backpack/basset/tests/Helpers/basset-test.js.
How can I fix this issue?