Code Monkey home page Code Monkey logo

Comments (14)

0xJacky avatar 0xJacky commented on June 19, 2024 1

I also test with the latest build of Nginx UI and nginx 1.25.3 but cannot reproduce this issue

from nginx-ui.

0xJacky avatar 0xJacky commented on June 19, 2024 1
image

This config can pass nginx -t

from nginx-ui.

0xJacky avatar 0xJacky commented on June 19, 2024 1

Well, I found out the reason, this issue only occurs when this site is the only one enabled site. So, I have to change the processing order which is mention in #230 (comment).

from nginx-ui.

0xJacky avatar 0xJacky commented on June 19, 2024

Which version of Nginx are you using?

I test on v1.24.0, it works fine.

from nginx-ui.

sanvu88 avatar sanvu88 commented on June 19, 2024

Which version of Nginx are you using?

I test on v1.24.0, it works fine.

i use version nginx/1.25.3

from nginx-ui.

0xJacky avatar 0xJacky commented on June 19, 2024

ok, i will test for this verison

from nginx-ui.

sanvu88 avatar sanvu88 commented on June 19, 2024

Before configuring TLS, is your website enabled or disabled?

image

from nginx-ui.

0xJacky avatar 0xJacky commented on June 19, 2024

It is enabled. By the way, I used apt install nginx from offical mainline repo.

from nginx-ui.

sanvu88 avatar sanvu88 commented on June 19, 2024

It is enabled. By the way, I used apt install nginx from offical mainline repo.

yeah, I use Nginx build from source. I will check again with apt

from nginx-ui.

0xJacky avatar 0xJacky commented on June 19, 2024

Maybe I should prepare the certificate at first by using http server, then create the https server from the configuration of http server.

from nginx-ui.

sanvu88 avatar sanvu88 commented on June 19, 2024

Maybe I should prepare the certificate at first by using http server, then create the https server from the configuration of http server.

I also think it's a good idea to sign SSL and make sure it's successful before creating an https server to avoid unnecessary errors.

from nginx-ui.

sanvu88 avatar sanvu88 commented on June 19, 2024

humh, I tried testing with apt install nginx from official mainline repo. And still got the error. it's hard to understand

nginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/sites-enabled/example.org:17

Output of nginx -V:

nginx version: nginx/1.25.3
built by gcc 12.2.0 (Debian 12.2.0-14)
built with OpenSSL 3.0.9 30 May 2023 (running with OpenSSL 3.0.11 19 Sep 2023) 
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_v3_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -ffile-prefix-map=/data/builder/debuild/nginx-1.25.3/debian/debuild-base/nginx-1.25.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'

virtual host:

server {
    listen 80;
    # listen [::]:80;
    server_name example.org;
    root /home/example.org;

    index index.html;

    location /.well-known/acme-challenge {
        proxy_set_header Host $host;
        proxy_set_header X-Real_IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
        proxy_pass http://127.0.0.1:9180;
    }
}

server {
    listen 443 ssl;
    # listen [::]:443;
    http2 on;

    server_name example.org;
    root /home/example.org;

    index index.html;

    location /.well-known/acme-challenge {
        proxy_set_header Host $host;
        proxy_set_header X-Real_IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
        proxy_pass http://127.0.0.1:9180;
    }
}

HTTP Context

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    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  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

from nginx-ui.

gaetan1903 avatar gaetan1903 commented on June 19, 2024

I have the same issue and i have only one site enabled

from nginx-ui.

sanvu88 avatar sanvu88 commented on June 19, 2024

I have the same issue and i have only one site enabled

jacky fixed it here: 17d6216

from nginx-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.