Error creating Certs

I'm not sure about the effect of alias within a location block.
Which is why I asked (on my first post after it was shown):

2 Likes

Try:

        location /.well-known/acme-challenge/ {
            default_type "text/plain";
            allow all;
            root /home/gpostman/public_html/.well-known/acme-challenge/;
            try_files $uri /catch.all 405;
        }#location
1 Like

Done! but Nop still the same...

2 Likes

Please post the entire nginx config:
nginx -T

2 Likes
include /etc/nginx/conf.d/vhosts/*.conf;

# configuration file /etc/nginx/conf.d/vhosts/gpostman.com.conf:
server {
listen [167.114.128.25:80](http://167.114.128.25:80);
server_name gpostman.com www.gpostman.com;

access_log /usr/local/apache/domlogs/gpostman.com.bytes bytes;
access_log /usr/local/apache/domlogs/gpostman.com.log combined;
error_log /usr/local/apache/domlogs/gpostman.com.error.log error;

location / {
location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff|ttf|svg|eot|sh|webp)$ {
root /home/gpostma/public_html;
expires max;
try_files $uri $uri/ @backend;
}

error_page 405 = @backend;
error_page 500 = @custom;
add_header X-Cache "HIT from Backend";
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
proxy_pass http://167.114.128.25:8181;
include proxy.inc;
}

location @backend {
internal;
proxy_pass http://167.114.128.25:8181;
include proxy.inc;
}

location @custom {
internal;
proxy_pass http://167.114.128.25:8181;
include proxy.inc;
}

location ~ .*\.(php|jsp|cgi|pl|py)?$ {
proxy_pass http://167.114.128.25:8181;
include proxy.inc;
}

location ~ /\.ht {deny all;}
location ~ /\.svn/ {deny all;}
location ~ /\.git/ {deny all;}
location ~ /\.hg/ {deny all;}
location ~ /\.bzr/ {deny all;}

disable_symlinks if_not_owner from=/home/gpostma/public_html;

location /.well-known/acme-challenge/ {
default_type "text/plain";
allow all;
root /home/gpostma/public_html/.well-known/acme-challenge/;
try_files $uri /catch.all 405;
}#location
}

server {
listen 167.114.128.25:80;
server_name webmail.gpostman.com;

access_log /usr/local/apache/domlogs/gpostman.com.bytes bytes;
access_log /usr/local/apache/domlogs/gpostman.com.log combined;
error_log /usr/local/apache/domlogs/gpostman.com.error.log error;

location / {
proxy_pass http://127.0.0.1:2095;
include proxy.inc;
}

location ~ /\.ht {deny all;}
location ~ /\.svn/ {deny all;}
location ~ /\.git/ {deny all;}
location ~ /\.hg/ {deny all;}
location ~ /\.bzr/ {deny all;}

disable_symlinks if_not_owner from=/home/gpostma/public_html;

location /.well-known/acme-challenge/ {
default_type "text/plain";
allow all;
root /home/gpostma/public_html/.well-known/acme-challenge/;
try_files $uri /catch.all 405;
}#location

}

server {
listen 167.114.128.25:80;
server_name mail.gpostman.com;

access_log /usr/local/apache/domlogs/gpostman.com.bytes bytes;
access_log /usr/local/apache/domlogs/gpostman.com.log combined;
error_log /usr/local/apache/domlogs/gpostman.com.error.log error;

location / {
proxy_pass http://127.0.0.1:2095;
include proxy.inc;
}

location ~ /\.ht {deny all;}
location ~ /\.svn/ {deny all;}
location ~ /\.git/ {deny all;}
location ~ /\.hg/ {deny all;}
location ~ /\.bzr/ {deny all;}

disable_symlinks if_not_owner from=/home/gpostma/public_html;

location /.well-known/acme-challenge/ {
default_type "text/plain";
allow all;
root /home/gpostma/public_html/.well-known/acme-challenge/;
try_files $uri /catch.all 405;
}#location
}

server {
listen 167.114.128.25:80;
server_name cpanel.gpostman.com;

access_log /usr/local/apache/domlogs/gpostman.com.bytes bytes;
access_log /usr/local/apache/domlogs/gpostman.com.log combined;
error_log /usr/local/apache/domlogs/gpostman.com.error.log error;

location / {
proxy_pass https://127.0.0.1:2083;
include proxy.inc;
}

location /pma {
proxy_pass https://127.0.0.1:2031;
include proxy.inc;
}

location /roundcube {
proxy_pass https://127.0.0.1:2031;
include proxy.inc;
}

location ~ /\.ht {deny all;}
location ~ /\.svn/ {deny all;}
location ~ /\.git/ {deny all;}
location ~ /\.hg/ {deny all;}
location ~ /\.bzr/ {deny all;}

disable_symlinks if_not_owner from=/home/gpostma/public_html;

location /.well-known/acme-challenge/ {
default_type "text/plain";
allow all;
root /home/gpostma/public_html/.well-known/acme-challenge/;
try_files $uri /catch.all 405;
}#location
}

# configuration file /etc/nginx/conf.d/vhosts/wss.gpostman.com.conf:
server {

listen 167.114.128.25:80;
server_name wss.gpostman.com;

access_log /usr/local/apache/domlogs/wss.gpostman.com.bytes bytes;
access_log /usr/local/apache/domlogs/wss.gpostman.com.log combined;
error_log /usr/local/apache/domlogs/wss.gpostman.com.error.log error;

location / {
location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff|ttf|svg|eot|sh|webp)$ {
root /home/wss/public_html;
expires max;
try_files $uri $uri/ @backend;
}

error_page 405 = @backend;
error_page 500 = @custom;
add_header X-Cache "HIT from Backend";
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
proxy_pass http://167.114.128.25:8181;
include proxy.inc;
}

location /send {
proxy_method POST;
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:9000/send;
client_max_body_size 10M;
}

location @backend {
internal;
proxy_pass http://167.114.128.25:8181;
include proxy.inc;
}

location @custom {
internal;
proxy_pass http://167.114.128.25:8181;
include proxy.inc;
}

location ~ .*\.(php|jsp|cgi|pl|py)?$ {
proxy_pass http://167.114.128.25:8181;
include proxy.inc;
}

location ~ /\.ht {deny all;}
location ~ /\.svn/ {deny all;}
location ~ /\.git/ {deny all;}
location ~ /\.hg/ {deny all;}
location ~ /\.bzr/ {deny all;}

disable_symlinks if_not_owner from=/home/wss/public_html;

location /.well-known/acme-challenge/ {
default_type "text/plain";
allow all;
root /home/wss/public_html/.well-known/acme-challenge/;
try_files $uri /catch.all 405;
}#location

}

Ok I made a Rebuild of web servers and now its working on gpostman.com, www.gpostman.com and wss.gpostman.com I could'n realize what was the problem!

2 Likes