-1

I have at home NAS server with apache 2.4 running on 443 with SSL ok on a ddns domain. On this server i have other services running like http in nodejs and in python. I also have other server on private network with other services where i also need to proxy on apache to take advantage of ssl and reduce the number of ports exposed to the internet.

To start i've tried to proxy the localhost aditional services using ProxyPass, ProxyPassReverse on subfolder, replicate folder structure because of resources without success. Tried with ending slash e without it... Also tried with htaccess and vhosts also without success. The best i achivied is for example OpenWebUI, i get the initial logo code but without showing the logo image... i thing i will need some string substitution on urls as openwebui don't have relative urls on resources.

I thinking that will be easier if i have subdomains, but my atual ddns provider do not allow this. Actualy searching to get a provider that allow a private domain in a ddns conection.

Example: 10.0.0.100 - NAS server

  • apache - 443
  • openwebui - 3033
  • gitea - 3100
  • portainer - no need to expose 10.0.0.101 - Other server with each service on their ports where i also want to proxy some of them
  • mariaDB
  • PostgreSQL
  • ollama
  • n8n
  • dify

Has someone tried similar situations with success ? If so, can point me the direction to go with some workable examples ? Or any other recomendations ?

TIA

JL

Added note:

After some tries i get some advance on proxy of openwebui... Now i supose i can get static resources, init the app, but got error that is nor running in correct way, need to start from backend... So far my conf for this apache settings is:

ProxyPass "/_app" "http://localhost:3033/_app"
ProxyPassReverse "/_app" "http://localhost:3033/_app/"
ProxyPass "/static" "http://localhost:3033/static"
ProxyPassReverse "/static" "http://localhost:3033/static/"
ProxyPass "/jl_ia" "http://localhost:3033/"
ProxyPassReverse "/jl_ia" "http://localhost:3033/"
2
  • So what is the requsult you get for requests that you say do not deliver the expected result? Certainly the ProxyPass feature can be used for what you try. Did it endless times myself, it is a standard solution. So you need to be more specific and tell us what issue you actually run into, exactly . So what does your browser's development console tell what the issue is with requests? And what do your apache log files reveal? Commented Sep 30, 2024 at 11:57
  • Thanks for your help. i solved with root folder of vhosts. Example below. Commented Sep 30, 2024 at 12:54

1 Answer 1

-1

For now i solved with subdomains and proxypass as i found a free ddns provider that allows sub-subdomains names (xxx.yyy.domain.zzz) where i can do tests before buying a private domain. Example of one of the vhost config on apache:

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName zzz.xyz.domain.com
    ProxyPass "/" "http://localhost:3033/"
    ProxyPassReverse "/" "http://localhost:3033/"
    SSLEngine On
        SSLCertificateKeyFile /usr/builtin/etc/certificate/ssl/ssl.key
        SSLCertificateFile /usr/builtin/etc/certificate/ssl/ssl.crt
</VirtualHost>
</IfModule>

This way the resource url problem of OpenWebUI was solved (my primary try) and others.

Thanks everyone

JL

Sign up to request clarification or add additional context in comments.

4 Comments

This does not at all explain what the actual issue was and how you solved it.
I have a problem using proxypass with root subfolders because of resources of the proxied site pointing to base url of the site (that means if i use the folder "/jl_ia" for this, one image for example is pointing to "/images/xyz.png" and it needs to be "/jl_ia/images/xyz.png"). One possible solution was replicate proxied folder structure, but not pratical. Other is some string substituition that apache also allow, but not used to and not found usable examples. So, i gone for the easiest way... proxied root of site with root of vhost. Not sure is i was clear, not my natural language.
So your solution is not to actually do what you asked about in your question, but to proceed with a completely different approach: to use a separate virtual host for each project instead of virtual folders inside a common host. So this is indeed not an answer to the question but suggtests some completely different approach.
@arkacha: Sure, you are right... I take a different approach from what i asked initialy. But this approach solved my problem, simply as that. If someone gets in same situation, he/she can take or not this approach, They decide.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.