https-portal icon indicating copy to clipboard operation
https-portal copied to clipboard

Noob question : custom proxy-pass to the URI on one domain only?

Open nunnsby opened this issue 4 years ago • 2 comments

I'm trying to proxy the URI detail of (awstats) behind the root domain. The actual page I have to load is https://domain.tld/cgi-bin/awstats/awstats.pl?config=linoxide, but I really just want to go to https://domain.tld, and then let nginx proxy the rest of the URI so I don't have to remember it every time I visit the site.

I know I can't use domain.tld -> domain.tld/URI in the DOMAIN section of the config file.

I understand I have to use proxy-pass to do this, but when I look at the examples here, and I implement this line : - https-portal-data:/var/lib/https-portal it breaks as I already have multiple other domains using lets-encrypt (LE) and I can see it is because that is overwriting the default area that LE uses too.

How can I keep my other domains as is and still achieve the proxying of the URI to the root domain for this one site?

nunnsby avatar Mar 05 '21 00:03 nunnsby

I'm afraid I don't fully understand your problem.

Are your other domains managed by HTTPS-PORTAL as well? If so, there should be no problem. If you want to override Nginx config for just one domain, checkout the document here. You can do:

- /path/to/http_config:/var/lib/nginx-conf/domain.tld.conf.erb:ro
- /path/to/http_config:/var/lib/nginx-conf/domain.tld.ssl.conf.erb:ro

I don't think it has anything to do with - https-portal-data:/var/lib/https-portal.

SteveLTN avatar Mar 06 '21 13:03 SteveLTN

You could add the following lines to the CUSTOM_NGINX_DOMAIN_TLD_CONFIG_BLOCK:

  location = / {
    return 307 https://domain.tld/URI/
  }

MarcelWaldvogel avatar Nov 22 '21 11:11 MarcelWaldvogel