Open 234146326 opened 4 years ago
- Check your DNS records are pointing to the right server
- Check your server firewall is not blocking the ACME challenge process
Thanks for your reply, I will use your suggestion tracking.
- Check your DNS records are pointing to the right server
- Check your server firewall is not blocking the ACME challenge process
Thanks for your reply, I will use your suggestion tracking.
DNS:
@weleoka @wmnnd @michal-wrzosek @mestrogov @Pixep @ynixon @DocDagbjort
No matter what I do, I can't solve this error. Hope to be concerned.Thank you
You could run the nginx container standalone and see if you can access it with HTTP only from outside.
docker-compose run --service-ports --rm --entrypoint "ash" nginx
. Try the command nginx
from withing the container see if any feedback.
Check in another console (or in tmux window if multiplexing) that docker ps -a
shows ports mapped to host from container as following:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d90500fba632 nginx "ash" 3 seconds ago Up 1 second 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp httpserve_nginx_run_d48309a4afe6
If that's ok, now try and get at a default served page for nginx... or some sort of error. Run cat /var/log/nginx/access.log
in your ash prompt in the container.
Curl your localhost or VPS and see if you get some sort of nginx forbidden page. curl localhost
or curl 123.123.123.123
. Better still: curl your VPS using it's DNS record domainname: curl my.examplemachine.com
.
If this works then there's some other reason letsencrypt ceritificate signing is failing.
if y
Hello, multiple dockers can use nginx normally. Cannot run alone.
I have used fpm:
upstream fastcgi_backend {
# use tcp connection
server php-fpm:9000;
# or socket
# server unix:/run/php/php7.3-fpm.sock;
}
Run alone:
In nginx container :
@weleoka thank you for your reply。
You could run the nginx container standalone and see if you can access it with HTTP only from outside.
docker-compose run --service-ports --rm --entrypoint "ash" nginx
. Try the commandnginx
from withing the container see if any feedback.Check in another console (or in tmux window if multiplexing) that
docker ps -a
shows ports mapped to host from container as following:CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d90500fba632 nginx "ash" 3 seconds ago Up 1 second 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp httpserve_nginx_run_d48309a4afe6
If that's ok, now try and get at a default served page for nginx... or some sort of error. Run
cat /var/log/nginx/access.log
in your ash prompt in the container.Curl your localhost or VPS and see if you get some sort of nginx forbidden page.
curl localhost
orcurl 123.123.123.123
. Better still: curl your VPS using it's DNS record domainname:curl my.examplemachine.com
.If this works then there's some other reason letsencrypt ceritificate signing is failing.
if y
Hello, multiple dockers can use nginx normally. Cannot run alone.
I have used fpm:
upstream fastcgi_backend { # use tcp connection server php-fpm:9000; # or socket # server unix:/run/php/php7.3-fpm.sock; }
Run alone:
In nginx container :
@weleoka thank you for your reply。
server {
listen 80;
server_name <xx.com>;
server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
execution :
ifconfig eth0 mtu 1300
3 ./init-letsencrypt.sh > Successfully generated data directory
谢谢 @weleoka Provide valuable responses.Thanks everyone.
Mark resolved.
Thanks @234146326, you're a life saver!
You could run the nginx container standalone and see if you can access it with HTTP only from outside.
docker-compose run --service-ports --rm --entrypoint "ash" nginx
. Try the commandnginx
from withing the container see if any feedback.Check in another console (or in tmux window if multiplexing) that
docker ps -a
shows ports mapped to host from container as following:CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d90500fba632 nginx "ash" 3 seconds ago Up 1 second 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp httpserve_nginx_run_d48309a4afe6
If that's ok, now try and get at a default served page for nginx... or some sort of error. Run
cat /var/log/nginx/access.log
in your ash prompt in the container.Curl your localhost or VPS and see if you get some sort of nginx forbidden page.
curl localhost
orcurl 123.123.123.123
. Better still: curl your VPS using it's DNS record domainname:curl my.examplemachine.com
.If this works then there's some other reason letsencrypt ceritificate signing is failing.
@weleoka can you be more specific as to what the "other reason letsencrypt ceritificate signing is failing" might be? All of this works for me, but eventually I still get a Challenged failed for my domain.
EDIT nevermind, the problem was this one: https://github.com/wmnnd/nginx-certbot/issues/86#issue-678535209
nginx.conf:
Thanks for the enthusiastic reply.Thank you
@wmnnd @michal-wrzosek @mestrogov @Pixep @ynixon