Git Product home page Git Product logo

Comments (6)

Archmonger avatar Archmonger commented on May 22, 2024

Nginx has a tutorial on serving static files.
I've never set up this use case, but based on what I was able to gather:

root /opt/Improved-Plex-Mobile;

include /etc/nginx/mime/types;

location /
{
    # Attempt to serve a file from the root directory before routing to the reverse proxy
    try_files $uri $uri/ @backend; 
}

location @backend
{
    proxy_pass http://127.0.0.1:3000;
}

Let me know if this works.

from improved-plex-mobile.

g-vdn avatar g-vdn commented on May 22, 2024

With $uri/ I get a 403 error. If I remove that, css is somehow loading but page is not displayed properly

from improved-plex-mobile.

Archmonger avatar Archmonger commented on May 22, 2024

Could be forbidden due to file permission issues. Perhaps the CSS file you're creating is not owned by the user that Nginx is running as.

from improved-plex-mobile.

g-vdn avatar g-vdn commented on May 22, 2024

Permissions are ok, user www-data has access to full path. I also moved the folder into /var/www, same thing.

L.E. Placing the statement autoindex on; in the / location gets rid of the 403 error, with $uri/ included. But css still seems off. Ill upload a screenshoot.

from improved-plex-mobile.

g-vdn avatar g-vdn commented on May 22, 2024

Screenshot_20210212_114810.jpg

from improved-plex-mobile.

Archmonger avatar Archmonger commented on May 22, 2024

Since I don't have experience with serving static files in tandem with a reverse proxy, I highly recommend asking for support in the #groups channel of the Organizr discord. They have a whole lot of Nginx professionals that are willing to help people with self-hosting issues, especially related to my CSS. The solution is likely going to look similar to the one I posted, but I'm sure I'm missing something.

Otherwise, reading the Nginx documentation may be the best way around this.

Apologies that I'm unable to directly help but this Nginx config is outside my expertise.

Let me know if you find a solution and I'll post it on the wiki for others in the future!

from improved-plex-mobile.

Related Issues (7)

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.