skip to Main Content

I created web page using blade so I checked if it works on brower, though it failed to access a css file.
I checked a brower developer and found a error message says ‘Failed to load resource: net::ERROR_CONNECTION_TIMED_OUT’.

Actually, I created this page on cloud9 and it seemed to reflect a css correctly.
When I move this program to another ec2 server, this error is happened.
It seems that css is in correct location( https://(IP address)/css/OO.css).

  • In blade,
    I wrote <link rel="stylesheet" href="{{ asset(‘css/OO.css’, true) }}"> to refer a css.

  • As for css location,
    public/css/〇〇.css

I would like to investigate why it occurs, though I dont know what to do.
I’m suffering to solve it for a while, so any advices or comments are helpful.

Any advices or comments are helpful.

2

Answers


  1. have you check the css file permissions? i got this issue before, after giving my css file permission to 777 (-rwxrwxrwx) the css file is readable again

    Login or Signup to reply.
  2. It’s mostly due to the permission issue on ec2 servers, For Laravel this is what we run in the ec2 server command line after the first deployment to make sure permissions are set properly.

    Login into your EC2 server using SSH and then run following commands to fix the permissions:

    sudo chmod 777 -R /var/www/html/public/css
    sudo chmod 777 -R /var/www/html/bootstrap/cache
    sudo chmod 777 -R /var/www/html/storage

    Note: Your Laravel install location might be different so please correct the path according to that.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search