Hi there! Trying to get nginx up and running for a pleroma instance. I was initially working off of this guide: https://docs.pleroma.social/debian_based_en.html#content. I’ve tried a bunch of things from around the internet to solve the problem of nginx just not wanting to be started, I’ll try to accurately enumerate them.
sudo service nginx start
returns
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
systemctl status nginx
returns
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-07-18 19:46:13 UTC; 11min ago
Docs: man:nginx(8)
Process: 8665 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
nginx -t
returns
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/sweetjams.club/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/sweetjams.club/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
the error.log file shows basically the same thing;
2019/07/18 20:07:57 [emerg] 8939#8939: BIO_new_file("/etc/letsencrypt/live/sweetjams.club/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/sweetjams.club/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
A common problem appears to be apache or something else using ports 80 or 440, I’ve already ensured that that is not the case here. It seems like I’ve got a .pem file missing, but tbh I don’t know what that is or where it should be or how to get one. So. Can anyone help me?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello,
Indeed the problem is that the .pem file is missing.
The .pem file is actually the SSL certificate for your sweetjams.club domain. You need to just add the SSL certificate in that
/etc/letsencrypt/live/sweetjams.club/fullchain.pem
file and the Nginx service should work as normal.If you don’t have an SSL certificate for this domain name, you could install a Let’s Encrypt SSL instead:
https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
Let me know if you need any help.
Regards, Bobby
Hello below is my nginx.conf file : PLEAE CHECK ALL IS OK.IF WRONG PLEASE CORRECT ME. MY WEBPAGE IS NOT SHOWING WHAT I WANT. I INSTALLED ODOO 12 AND LINK ODOO WITH DOMAIN BUT WHEN I ENTER surveyspan.com odoo will work but when i enter https://www.surveyspan.com it will showing Welcome to nginx. Please help me for this.
user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf;
events { worker_connections 768; # multi_accept on; }
http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off;
}
Hit the reply cap again! @bobbyiliev my DNS table now looks like this Does that look right to you? I’m still getting the No valid IP address error.
I guess there’s a limit on replies, it wouldn’t let me comment in that thread, but @Artelis, here we go!
The
root
lines inpleroma.nginx
were commented out, I went ahead and uncommented them. The path was/var/lib/letsencrypt/
. Running the --webroot command with that path gave the same error as above withDetail: unknownHost :: No valid IP address found for sweetjams.club
.This comment has been deleted