Score:0

After I ran certbot browsers cannot access css file

hu flag

After I ran certbot --nginx browsers cannot access css of my website.

style.css is located in ./styles of root of my site. The error is Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID style.css:1

Edited: string from my .html files (where example.com is my site domain):

<link rel="stylesheet" type="text/css" href="https://www.example.com/styles/style.css">

Edited: my tree -p output:

.
├── [drwxr-xr-x]  about
│   ├── [-rw-r--r--]  index.html
│   └── [-rw-r--r--]  index.md
├── [-rw-r--r--]  icon.ico
├── [-rw-r--r--]  index.html
├── [-rw-r--r--]  index.md
├── [drwxr-xr-x]  styles
│   ├── [-rw-r--r--]  prev.css
│   └── [-rw-r--r--]  style.css
└── [drwxr-xr-x]  templates
    └── [-rw-r--r--]  temp.html

Edited: new error ocured:

example.com/:5 GET https://www.example.com/styles/style.css net::ERR_CERT_COMMON_NAME_INVALID

What should I do to solve the issue?

digijay avatar
mx flag
Could you show the first line of `style.css`, please? I think there is a wrong `@import` or something.
Laughing Laugh wwwwwww avatar
hu flag
Hi! No, I didn't use ```@import``` in my ```style.css```. It used to work until recently.
us flag
Please add the output of `nginx -T` to the question so we can see your full nginx configuration. Most likely Certbot has made bad changes to the configuration.
djdomi avatar
za flag
does the cert include www and domaun only, it is telling strictly that something is wrong on the line one, please show us eother the real domain name or the content of the file
Score:0
hu flag

I solved this issue putting www.example.com into my server_name except example.com. Thank you everyone for your answers.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.