• 06-10-2023, 09:35:45
    #1
    merhaba arkadaşlar http://sub.xxx.com:8000 olan portlu uygulamamın tarayıcıda http://sub.xxx.com şeklinde açılmasını istiyorum ngnix conf dosyam aşağıdaki şekilde ancak yöndelndirme olmuyor. yardımcı olabilecek varsa sevinirim.

    server {
        listen 80;
        listen [::]:80;
        
        server_name sub.xxx.com.tr;
    
        location / {
             proxy_pass http://127.0.0.1:8000;
            return 301 https://$server_name$request_uri;
        }
    }
    
    server {
        listen 443 ssl;
        listen [::]:443 ssl;
        
        server_name sub.xxx.com.tr ;
        
        ssl_certificate /etc/letsencrypt/live/sub.xxx.com.tr /fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/sub.xxx.com.tr /privkey.pem;
        
        location / {
            index index.html;
            # Path to kiwiirc client files
            root /usr/share/kiwiirc/;
        }
        
        location /webirc/ {
            # Forward incoming requests to local webircgateway socket
            proxy_pass http://127.0.0.1:8000/webirc/;
    
            # Set http version and headers
            proxy_http_version 1.1;
            
            # Add X-Forwarded-* headers
            proxy_set_header X-Forwarded-Host   $host;
            proxy_set_header X-Forwarded-Proto  $scheme;
            proxy_set_header X-Forwarded-For    $remote_addr;
    
            # Allow upgrades to websockets
            proxy_set_header Upgrade     $http_upgrade;
            proxy_set_header Connection  "upgrade";
    
        }
        
        location /files/ {
            # Forward incoming requests to local fileuploader instance
            proxy_pass http://127.0.0.1:8000/files/;
    
            # Disable request and response buffering
            proxy_request_buffering  off;
            proxy_buffering          off;
            proxy_http_version       1.1;
    
            # Add X-Forwarded-* headers
            proxy_set_header X-Forwarded-Host   $host;
            proxy_set_header X-Forwarded-Proto  $scheme;
            proxy_set_header X-Forwarded-For    $remote_addr;
    
            # Allow fileuploader to control the max size
            client_max_body_size         0;
        }
    }
  • 06-10-2023, 09:43:36
    #2
    dev
    Kurumsal Üye
    Ticarisohbet adlı üyeden alıntı: mesajı görüntüle
    merhaba arkadaşlar http://sub.xxx.com:8000 olan portlu uygulamamın tarayıcıda http://sub.xxx.com şeklinde açılmasını istiyorum ngnix conf dosyam aşağıdaki şekilde ancak yöndelndirme olmuyor. yardımcı olabilecek varsa sevinirim.

    server {
        listen 80;
        listen [::]:80;
        
        server_name sub.xxx.com.tr;
    
        location / {
             proxy_pass http://127.0.0.1:8000;
            return 301 https://$server_name$request_uri;
        }
    }
    
    server {
        listen 443 ssl;
        listen [::]:443 ssl;
        
        server_name sub.xxx.com.tr ;
        
        ssl_certificate /etc/letsencrypt/live/sub.xxx.com.tr /fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/sub.xxx.com.tr /privkey.pem;
        
        location / {
            index index.html;
            # Path to kiwiirc client files
            root /usr/share/kiwiirc/;
        }
        
        location /webirc/ {
            # Forward incoming requests to local webircgateway socket
            proxy_pass http://127.0.0.1:8000/webirc/;
    
            # Set http version and headers
            proxy_http_version 1.1;
            
            # Add X-Forwarded-* headers
            proxy_set_header X-Forwarded-Host   $host;
            proxy_set_header X-Forwarded-Proto  $scheme;
            proxy_set_header X-Forwarded-For    $remote_addr;
    
            # Allow upgrades to websockets
            proxy_set_header Upgrade     $http_upgrade;
            proxy_set_header Connection  "upgrade";
    
        }
        
        location /files/ {
            # Forward incoming requests to local fileuploader instance
            proxy_pass http://127.0.0.1:8000/files/;
    
            # Disable request and response buffering
            proxy_request_buffering  off;
            proxy_buffering          off;
            proxy_http_version       1.1;
    
            # Add X-Forwarded-* headers
            proxy_set_header X-Forwarded-Host   $host;
            proxy_set_header X-Forwarded-Proto  $scheme;
            proxy_set_header X-Forwarded-For    $remote_addr;
    
            # Allow fileuploader to control the max size
            client_max_body_size         0;
        }
    }
    server {
       server_name sub.xxx.com.tr;
    
       location / {
           proxy_pass http://127.0.0.1:8000;
           proxy_set_header Host            $host;
           proxy_set_header X-Forwarded-For $remote_addr;
       }
    }
    seklinde deneyin.