Closed moretocome closed 6 years ago
I used native ssl instead of the proxy.
Same thing happening here...
There may be some issues:
location /<etherpad-specific>
sections that supposedly should catch etherpad-specific urlstry_files
directives get triggered because they are inside a regex location section, and regex section are always checked after literal prefix matches unless they are not explicitly turned off. From the nginx core module documentation:
If the longest matching prefix location has the “^~” modifier then regular expressions are not checked. But you are not using the
^~
modifier, so the regex are evaluated and bring you toindex.php
/pad/static
section is wrong. It should perform /pad/static/(.*)
-> /static/$1
, and instead rewrites /static/(.*)
-> /static/$1
, thus doing nothing.Try these modifications (they worked on a quick replica of your config):
@@ -109,7 +105,7 @@ server {
expires 30d;
}
- location /pad {
+ location ^~ /pad {
rewrite /pad/(.*) /$1 break;
rewrite ^/pad$ /pad/ permanent;
proxy_pass http://localhost:9001/;
@@ -119,7 +115,7 @@ server {
proxy_buffering off;
}
- location /pad/socket.io {
+ location ^~ /pad/socket.io {
rewrite /pad/socket.io/(.*) /socket.io/$1 break;
proxy_pass http://localhost:9001/;
proxy_redirect / /pad/;
@@ -135,8 +131,8 @@ server {
proxy_set_header Connection $connection_upgrade;
}
- location /static {
- rewrite /static/(.*) /static/$1 break;
+ location ^~ /pad/static {
+ rewrite /pad/static/(.*) /static/$1 break;
proxy_pass http://localhost:9001/;
proxy_set_header Host $host;
proxy_buffering off;
Most important point:
Do you know if this configuration was copied from somewhere?
If so, it would be a good idea to modify the original documentation in order to fix the problem for other users too.
I try to make etherpad-lite available in a subfolder of my domain with a nginx reverse proxy.
I can get to the etherpad-lite front page through the proxy, but no static files are loading, and in the access log, I can see that nginx tries to send them to the php-handler instead of etherpad-lite.
My nginx config:
From access.log:
Does anyone have an idea on how I can make sure the etherpad-lite static files are served from the right place?
Thanks in advance!