Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Url forwarding

Url forwarding

Scheduled Pinned Locked Moved Solved Support
proxymanagerreverseproxy
22 Posts 5 Posters 2.9k Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Chris 0

    Within the nginx log I've found an bind error to port 80, which i was not able to resolve, so therefore I've reinstalled the nginx server on rpi from scratch, but the same error still persists.

    The curl cmd running on nginx server

    pi@piHole:~/nginxmanager $ curl -k -H 'Host: <subdomain1.domain.org>' http://192.168.178.94
    <html>
    <head><title>301 Moved Permanently</title></head>
    <body>
    <center><h1>301 Moved Permanently</h1></center>
    <hr><center>nginx</center>
    </body>
    </html>
    

    And the current nginx configuration for two cloudron apps:

    pi@piHole:~/nginxmanager $ cat data/nginx/proxy_host/1.conf 
    
    server {
      set $forward_scheme https;
      set $server         "192.168.178.94";
      set $port           443;
    
      listen 80;
      listen [::]:80;
    
      listen 443 ssl http2;
      listen [::]:443 ssl http2;
    
      server_name <subdomain1.domain.org> <subdomain2.domain.org>;
    
      # Let's Encrypt SSL
      include conf.d/include/letsencrypt-acme-challenge.conf;
      include conf.d/include/ssl-ciphers.conf;
      ssl_certificate /etc/letsencrypt/live/npm-1/fullchain.pem;
      ssl_certificate_key /etc/letsencrypt/live/npm-1/privkey.pem;
    
      # Asset Caching
      include conf.d/include/assets.conf;
    
      # Block Exploits
      include conf.d/include/block-exploits.conf;
    
      # HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years)
      add_header Strict-Transport-Security "max-age=63072000; preload" always;
    
      # Force SSL
      include conf.d/include/force-ssl.conf;
    
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $http_connection;
      proxy_http_version 1.1;
    
    
      access_log /data/logs/proxy-host-1_access.log proxy;
      error_log /data/logs/proxy-host-1_error.log warn;
    
    
      location / {
    
        # HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years)
        add_header Strict-Transport-Security "max-age=63072000; preload" always;
        
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
        proxy_http_version 1.1;
      
    
        # Proxy!
        include conf.d/include/proxy.conf;
      }
      # Custom
      include /data/nginx/custom/server_proxy[.]conf;
    }
    
    nebulonN Away
    nebulonN Away
    nebulon
    Staff
    wrote on last edited by
    #21

    @Chris-0 what exactly is the mentioned bind error? Is something already listening on port 80? From you curl output, it seems nginx is actually running fine on port 80, so it is unclear what your issue now is. Also given the various includes of other config files in your posted nginx config file, it is impossible to make further suggestions or observations.

    C 1 Reply Last reply
    0
    • nebulonN nebulon

      @Chris-0 what exactly is the mentioned bind error? Is something already listening on port 80? From you curl output, it seems nginx is actually running fine on port 80, so it is unclear what your issue now is. Also given the various includes of other config files in your posted nginx config file, it is impossible to make further suggestions or observations.

      C Offline
      C Offline
      Chris 0
      wrote on last edited by
      #22

      @nebulon Yes, there was an other port open on the raspberry - possibly from old services running on this device. But after reinstallation it was gone...

      So then I just posted the default generated nginx config for two subdomains. But I get it, that those includes are quite confusing... I try to create a cleaner version.

      Thank you for your patience.

      1 Reply Last reply
      0
      • girishG girish forked this topic on
      • girishG girish marked this topic as a question on
      • girishG girish has marked this topic as solved on
      • girishG girish locked this topic on
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search