Comments (6)
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.
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.
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.
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.
from improved-plex-mobile.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from improved-plex-mobile.