Missing permission checking nginx configuration

nginx -t

BIO_new_file("/etc/letsencrypt/live/domain/fullchain.pem") failed (SSL: error:0200100D:system library:fopen:Permission denied:fopen('/etc/letsencrypt/live/domain/fullchain.pem','r') error:2006D002:BIO routines:BIO_new_file:system lib)

i have tried all the options but still

sudo chmod a+w /etc/letsencrypt/live
sudo chmod a+w /etc/letsencrypt/archive

sudo chmod -R 750 /etc/letsencrypt/live
sudo chmod -R 750 /etc/letsencrypt/archive

sudo chmod 710 /etc/letsencrypt/live
sudo chmod 710 /etc/letsencrypt/archive

1 Like

Hi @IITIANS

run the command as sudo or root.

PS: Updated your topic title.

2 Likes

as sudo and root theres no issue

as root nginx -t

nginx: [warn] conflicting server name “iitians.xyz” on [::]:80, ignored

nginx: [warn] conflicting server name “www.iitians.xyz” on [::]:80, ignored

nginx: [warn] conflicting server name “iitians.xyz” on [::]:443, ignored

nginx: [warn] conflicting server name “www.iitians.xyz” on [::]:443, ignored

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

as sudo nginx -t

nginx: [warn] conflicting server name “iitians.xyz” on [::]:80, ignored

nginx: [warn] conflicting server name “www.iitians.xyz” on [::]:80, ignored

nginx: [warn] conflicting server name “iitians.xyz” on [::]:443, ignored

nginx: [warn] conflicting server name “www.iitians.xyz” on [::]:443, ignored

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

But its showing default nginx welcome page instead of webpage

There are a lot of problems.

Every combination of port and domain name must be unique.

What says

nginx -T

Yes, you have tons of duplicated definitions, so the wrong vHost is used.

U mean to say on port 80 i should use iitians.xyz and 443 www.iitians.xyz

Is that it. Wrong vHost, pls elaborate

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.