#CSS is broken

1 messages · Page 1 of 1 (latest)

polar summit
#

I built a ctrlpanel through SSL, but the CSS is broken and looks like the attached screenshot.
Please help me

indigo bramble
#

looks like some mixed content error

nocturne glenBOT
#

Can you please fetch the error logs, so we can assist you better regarding this error.
tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99

quiet chasm
#

Actually, try this:
php artisan storage:link

zenith quiver
polar summit
#

I tried running the above two commands, but nothing changed.

zenith quiver
#

or try to modify

polar summit
#

This panel has not been modified in any way

#

I just installed it

zenith quiver
#

tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99

and run this and give link here for check any error showing or not

polar summit
zenith quiver
#

```Next Illuminate\Database\QueryException: SQLSTATE[HY000] [1698] Access denied for user 'forge'@'localhost' (SQL: select * from settings)

#

check properly you set right config(password, username, db name) or not

polar summit
#

What is 'forge'@'localhost'?
I have no such database configured

zenith quiver
#

first configure database

polar summit
#

I don't use the username forge.

nocturne glenBOT
#

Can you please fetch the error logs, so we can assist you better regarding this error.
tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99

zenith quiver
polar summit
#

I am writing SSL directly in the nginx conf, but is this wrong?

#

If this is the cause, please tell me the correct way to do it.

zenith quiver
polar summit
#

I'm doing it like this

zenith quiver
#
        listen 80;
        root /var/www/controlpanel/public;
        index index.php index.html index.htm index.nginx-debian.html;
        server_name YOUR.DOMAIN.COM;

        location / {
                try_files $uri $uri/ /index.php?$query_string;
        }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        }

        location ~ /\.ht {
                deny all;
        }
}```

this is right configure and in here you need to some changes after paste (line 5 "YOUR.DOMAIN.COM:" add you domain for example "dash.example.com"
polar summit
nocturne glenBOT
# polar summit How do I use SSL in this case?

There are many ways to add SSL to your site. A simple solution is to use certbot from let’s encrypt. cerbot will automatically install the certificates for you and keep your SSL certs up to date!

sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo certbot --nginx -d yourdomain.com```
zenith quiver
#

read docs properly and install bcz you doing everything wrong steps or hire anyone for install cpgg for you

zenith quiver
# polar summit How do I use SSL in this case?
#install certbot for nginx
sudo apt install -y certbot
sudo apt install -y python3-certbot-nginx
#install certificates
sudo certbot --nginx -d yourdomain.com```

just follow this command (don't run all command once) 1 by 1 run the command and last line (sudo certbot --nginx -d yourdomain.com) change value of youdomain.com to your dashboard url
polar summit
#

I did SSL that way, but the CSS is not loaded first

zenith quiver
nocturne glenBOT
#

Can you please fetch the error logs, so we can assist you better regarding this error.
tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99

polar summit
zenith quiver
#

composer install --no-dev --optimize-autoloader

#

than this

polar summit
#

I ran it but there is no change

zenith quiver
cosmic wing
#

@polar summit Do you use reverse proxy?

#

Also, can you please show your browser console?

cosmic wing
polar summit
indigo bramble
#

You can try adding a rewrite rule from http to https

cosmic wing
cosmic wing
#

Do you use Cloudflare?

cosmic wing
polar summit
#

No, I haven't used it

cosmic wing
#

Try adding this line to your .env file

ASSET_URL="${APP_URL}"
#

You can paste it right below the APP_URL

nocturne glenBOT
#

After editing the .env File please run those commands to clear the Cache:

php artisan cache:clear
php artisan config:clear
cosmic wing
#

Also, run this commands after doing step above

polar summit
#

It has been improved a little, but it seems that the fundamental solution is still not solved.

cosmic wing
polar summit
zenith quiver
polar summit
#

After some trial and error, the CSS was loaded successfully!