Code Monkey home page Code Monkey logo

Comments (7)

Difegue avatar Difegue commented on May 20, 2024

From what I'm seeing, you need to add the following location block to get themes:

location /themes/ {
	include /config/nginx/auth_basic.conf;
	proxy_pass http://172.20.0.8:3000/themes/;
}

As for specific reverse proxy support, I can't really do anything more than what's already there, i.e specifying port/interfaces for the server to listen on.

I don't know much about nginx, but if it's like apache your best shot is to map all of port 3000 to a subdomain, if possible:
https://whatididtodowhatidid.wordpress.com/2014/03/14/subdomains-for-ports-on-same-ubuntu-server-with-nginx-reverse-proxy/

from lanraragi.

jmctune avatar jmctune commented on May 20, 2024

Thanks for the really quick response there.

That was the missing piece. Themes are pulling in now. All of the above was required, along with your additional location block. Thanks a lot!

from lanraragi.

fullmetal1 avatar fullmetal1 commented on May 20, 2024

So I just tried this and found that there's a lot more locations that would need to be passed for this to work now. Would it be possible to implement a base url config option like many other self hosted webservers have?

from lanraragi.

Difegue avatar Difegue commented on May 20, 2024

You can find a cleaner reverse proxy nginx config here: https://sugoi.gitbook.io/lanraragi/installing-lanraragi/methods#warning-reverse-proxies

from lanraragi.

fullmetal1 avatar fullmetal1 commented on May 20, 2024

So base url is 'will not support'?

from lanraragi.

Difegue avatar Difegue commented on May 20, 2024

Not for now since there's no built-in support for it in mojo and I'd have to whip up something -- Feel free to make a new issue about it though!

https://stackoverflow.com/questions/31864849/how-do-i-set-the-base-url-for-my-proxied-app
https://stackoverflow.com/questions/25170147/base-url-in-mojolicious-template-rendering

from lanraragi.

fullmetal1 avatar fullmetal1 commented on May 20, 2024

Seems like the mojolicious guys don't want to add direct support for base-url

mojolicious/mojo#484

However, there is documentation on using the before-dispatch hook to rewrite URLs.

https://docs.mojolicious.org/Mojolicious/Guides/Cookbook#Rewriting

from lanraragi.

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.