Skip to content
YACReader
Help and support for Linux users.

nginx proxy_pass subdirectory for YACReader server

  • chinanoahli
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 9 months ago #6442 by chinanoahli
I am trying to hosting YACReader server to
Code:
http://homeserver/yacserver
with nginx proxy_pass.
But I never got it done.
When I open
Code:
http://homeserver/yacserver
, it can not get the resource files(like css and some picture files) correctly, the page always trying to get the resource files at:
e.g.:
Code:
http://homeserver/css/reset.css
Code:
http://homeserver/images/library@2x.png

I was configure nginx like this:
nginx.conf:

include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
}

http {
sendfile on;

tcp_nopush on;
tcp_nodelay on;

keepalive_timeout 65;

types_hash_max_size 2048;

server_tokens off;

default_type application/octet-stream;

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

gzip on;

client_max_body_size 100M;

include /etc/nginx/mime.types;

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}


/etc/nginx/sites-enabled/homepage.conf:
Reference: www.yacreader.com/forum/support-ios/1545...nginx-reversed-proxy

server {
server_name 192.168.8.100 127.0.0.1;

listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;

# ssl on;

ssl_certificate /opt/homeserverCA/ca.crt;
ssl_certificate_key /opt/homeserverCA/ca.key.unsecure;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ecdh_curve X25519:P-256:P-384:P-224:P-521;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:ECDHE-RSA-AES128-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA128:DHE-RSA-AES128-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA128:ECDHE-RSA-AES128-SHA384:ECDHE-RSA-AES128-SHA128:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA128:DHE-RSA-AES128-SHA128:DHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA384:AES128-GCM-SHA128:AES128-SHA128:AES128-SHA128:AES128-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4';
ssl_prefer_server_ciphers on;

location = /yacserver {
return 301 /yacserver/;
}

location /yacserver/ {
proxy_pass http://127.0.0.1:18004/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# If you want to log the remote port of the image senders, you'll need that
proxy_set_header X-Remote-Port $remote_port;
proxy_set_header X-Forwarded-Proto $scheme;

# We expect the downsteam servers to redirect to the right hostname, so don't do any rewrites here.
proxy_redirect off;
}
}


How can I get it done, Thanks.

Please Log in or Create an account to join the conversation.

Moderators: Luis Ángel
Powered by Kunena Forum

Thanks for downloading YACReader!

Your download is starting.

YACReader for iOS and Android

Connect to YACReaderLibrary to browse, read remotely and import comics. Your reading progress is synchronized across devices.

Download on the App Store Get it on Google Play Available at Amazon Appstore

Discover all the features on the iOS and Android pages, and learn how to use them in the iOS and Android user guides.

Support YACReader

YACReader for desktop and server is free to use, but it is not free to develop: maintaining this website, developer programs, code signing certificates, test devices and, of course, all the time it takes. Less than 0.01% of downloads end in a donation, so any amount counts.

By supporting the project you help keep it regularly updated and, most importantly, alive. Thanks!