Giter Club home page Giter Club logo

Comments (16)

lusum avatar lusum commented on June 17, 2024 1

Same problem with apache, i see only a directory with the files, version 0.50.1

php 8.1

from ample.

SimonHova avatar SimonHova commented on June 17, 2024 1

The SO link worked for me! In addition to changing the rewrite rule to index.html, I had to change the index page to include the .html file as well.

index index.php index.html;

Thank you!

from ample.

mitchray avatar mitchray commented on June 17, 2024

Does it work if you have a trailing slash?

http://myserver.com:5006/ample/ vs http://myserver.com:5006/ample

from ample.

SimonHova avatar SimonHova commented on June 17, 2024

In Chrome, it seems to make no difference if I use trailing slashes or none. Though, if I leave it off, it adds the slash for me when loading the error page.

from ample.

mitchray avatar mitchray commented on June 17, 2024

Ah OK, did you update the index.php to index.html? https://github.com/mitchray/ample/wiki/NGINX-rewrite

from ample.

SimonHova avatar SimonHova commented on June 17, 2024

from ample.

mitchray avatar mitchray commented on June 17, 2024

If there is no further clues in browser console or nginx logs then I'm afraid I don't know why it wouldn't be working anymore

Hopefully if its affecting more nginx users they can chime in

from ample.

mitchray avatar mitchray commented on June 17, 2024

Only other thing I can think of is trying

location /ample {
    if (!-e $request_filename) {
        rewrite ^(.*)$ /index.html;
    }
}

from ample.

SimonHova avatar SimonHova commented on June 17, 2024

Unfortunately, that did not work.

I tried the solution offered by the link and turned on autoindex, it just displays the index of the /ample/ folder.

   # for ample media player
   location /ample {
    autoindex on;
    if (!-e $request_filename) {
        rewrite ^(.*)$ /ample/index.html;
    }
   }

You had also mentioned showing the source; I hit ctrl+u from the home page that was not working, and a pretty basic nginx error page.

  | <html>
-- | --
  | <head><title>403 Forbidden</title></head>
  | <body bgcolor="white">
  | <center><h1>403 Forbidden</h1></center>
  | <hr><center>nginx</center>
  | </body>
  | </html>
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  |  


What's odd is that I go to the http://myserver:5006/ample/smartlists/ page, it loads the page normally, including a seemingly normal HTML page.

Then, I navigate back to the home page by clicking on the top left corner, and while it looks right on my screen, typing ctrl+u gives me the exact same page as the first one.

  | <html>
-- | --
  | <head><title>403 Forbidden</title></head>
  | <body bgcolor="white">
  | <center><h1>403 Forbidden</h1></center>
  | <hr><center>nginx</center>
  | </body>
  | </html>
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  | <!-- a padding to disable MSIE and Chrome friendly error page -->
  |  

Does that shine any light on the problem?

from ample.

mitchray avatar mitchray commented on June 17, 2024

Can you provide apache logs and browser console messages?

Simon is using a port in the URL, are you also?

from ample.

mitchray avatar mitchray commented on June 17, 2024

I think I've identified the problem...

Unfortunately so far I can only see two solutions and neither are good.

  1. Require everyone to build from source with their own URL hardcoded, instead of auto-detection which is broken with Vite.
  2. Revert Vite back to Snowpack and lose all the benefits of Vite.

I'll continue exploring solutions

from ample.

mitchray avatar mitchray commented on June 17, 2024

@SimonHova @lusum can you test with 0.50.2 please and report back if it works

https://github.com/mitchray/ample/releases/tag/0.50.2

from ample.

lusum avatar lusum commented on June 17, 2024

Same problem with 0.50.2, no particular error. If i click on index.html, it appears the login page, but when i log into i have a Sorry not found message with nothing shown.

from ample.

lusum avatar lusum commented on June 17, 2024

Partial logs

"GET /ampache-dev/ample/index.html HTTP/1.1" 200 1016 "-"
"GET /ampache-dev/ample/assets/index.fbfb013f.css HTTP/1.1" 200 13441 "http://192.168.x.x/ampache-dev/ample/index.html"
"GET /ampache-dev/ample/assets/index.fbfb013f.css HTTP/1.1" 200 13440 "http://192.168.x.x/ampache-dev/ample/index.html"
"GET /ampache-dev/ample/assets/index.381f3380.js HTTP/1.1" 200 184195 "http://192.168.x.x/ampache-dev/ample/index.html"
"GET /ampache-dev/server/json.server.php?action=ping HTTP/1.1" 200 321 "http://192.168.x.x/ampache-dev/ample/index.html"
"GET /ampache-dev/server/json.server.php?action=ping&auth=e93457abe5e171b30cc459503ab143f7 HTTP/1.1" 200 896 "http://192.168.x.x/ampache-dev/ample/index.html"
"GET /ampache-dev/ample/assets/refreshArtists.6ad790e5.js HTTP/1.1" 200 906 "http://192.168.x.x/ampache-dev/ample/index.html"

from ample.

SimonHova avatar SimonHova commented on June 17, 2024

No good for me either.

nginx error log:
2022/12/11 21:18:22 [error] 583#583: *450018 directory index of "/opt/ampache/public/ample/" is forbidden, client: 10.18.1.152, server: 1xxxs.hxxxa.net, request: "GET /ample/ HTTP/1.1", host: "1xxxs.hxxxa.net:5006"

nginx access log:
10.18.1.152 - - [11/Dec/2022:21:20:36 -0500] "GET /ample/ HTTP/1.1" 403 180 "-" "Mozilla/5.0 (X11; CrOS x86_64 15183.59.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"

Nothing hits the Ampache debug logs on my side.

from ample.

mitchray avatar mitchray commented on June 17, 2024

Its most likely a server config issue then... check that index.html is a valid file to load

https://stackoverflow.com/a/36310143

Ample v0.50.0 switched from index.php to index.html so if it worked before v0.50.0 but is broken now, thats the leading theory.

from ample.

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.