You are not logged in.
Hello,
I try to use certbot keys but now nginx is not serving my sites. When I restart nginx , I see
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2017-12-09 19:46:33 GMT; 3s ago
Process: 454 ExecStart=/usr/bin/nginx -g pid /run/nginx.pid; error_log stderr; (code=exited, status=0/SUCCESS)
Main PID: 455 (nginx)
CGroup: /system.slice/nginx.service
├─455 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; error_log stderr;
└─456 nginx: worker process
Dec 09 19:46:33 ytsejam systemd[1]: Stopped A high performance web server and a reverse proxy server.
Dec 09 19:46:33 ytsejam systemd[1]: Starting A high performance web server and a reverse proxy server...
Dec 09 19:46:33 ytsejam nginx[454]: 2017/12/09 19:46:33 [warn] 454#454: conflicting server name "www.ozkandurakoglu.com" on 0.0.0.0:443, ignored
Dec 09 19:46:33 ytsejam nginx[454]: 2017/12/09 19:46:33 [warn] 454#454: conflicting server name "www.ozkandurakoglu.com" on [::]:443, ignored
Dec 09 19:46:33 ytsejam systemd[1]: nginx.service: PID file /run/nginx.pid not readable (yet?) after start: No such file or directory
Dec 09 19:46:33 ytsejam systemd[1]: Started A high performance web server and a reverse proxy server.
my nginx config is
user ytsejam http;
worker_processes auto;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
#pid /run/nginx/nginx.pid;
events {
worker_connections 1024;
use epoll;
multi_accept on;
}
http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 100m;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
autoindex off;
#tcp_nopush on;
#tcp_nodelay on;
server_names_hash_bucket_size 64;
map $scheme $fastcgi_https { ## Detect when HTTPS is used
default off;
https on;
}
#keepalive_timeout 0;
keepalive_timeout 65;
client_header_timeout 300;
client_body_timeout 300;
fastcgi_read_timeout 300;
#client_max_body_size 32m;
fastcgi_buffers 8 128k;
fastcgi_buffer_size 128k;
#max_execution_time = 300;
gzip on;
#gzip_disable "msie6";
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
#gzip_comp_level 2;
gzip_types text/css text/x-component application/x-javascript
application/javascript text/javascript text/x-js text/richtext
image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
text/js font/truetype font/opentype;
upstream php {
server unix:/var/run/php-fpm/php-fpm.sock;
}
include /etc/nginx/sites-enabled/*;
}
When I use nginx -t
2017/12/09 19:51:34 [warn] 489#489: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
2017/12/09 19:51:34 [emerg] 489#489: BIO_new_file("/etc/letsencrypt/live/www.ozkandurakoglu.com/fullchain.pem") failed (SSL: error:0200100D:system library:fopen:Permission denied:fopen('/etc/letsencrypt/live/www.ozkandurakoglu.com/fullchain.pem','r') error:2006D002:BIO routines:BIO_new_file:system lib)
nginx: configuration file /etc/nginx/nginx.conf test failed
Can you help me ?
Offline
nginx is not serving my sites
is not a error message.
The test very most likely fails as you run it as ordinary user (in any case you lack access to /etc/letsencrypt/live/www.ozkandurakoglu.com/fullchain.pem, ensure the http group has read access) and the service status doesn't indicate failures.
Is port 80 open?
How do you determine your "sites aren't served"? (And please don't say "they don't show up in my browser")
What are "your sites"?
Did you check the nginx logs? (access and error)
Offline
Sorry for asking the question in a wrong way. The notification of nginx server misguided me. It was an error of postgresql. I fixed it in all Django sites.
After I had to arrange Django sites SSL settings again.
Thanks.
Offline
No problem, just always keep in mind that the more you investigate and tell us what you tried and didn't work (by what error message ;-) the faster we can get to the bottom of this.
I take this is now settled? In case please also always remember to mark a [SOLVED] thread by editing the subject of your initial post.
Offline