[GH-ISSUE #294] Cant add songs to my playlist and cant logout with apache #211

Closed
opened 2026-02-26 02:32:27 +03:00 by kerem · 7 comments
Owner

Originally created by @Arendt on GitHub (Apr 6, 2016).
Original GitHub issue: https://github.com/koel/koel/issues/294

I use apache and can not add music to my playlist and the logout button does not work.

Koel Version: 2.2.0

Error in Chrome Console when try to add music:

PUT https://music.my-domain.com/api/playlist/3/sync 403 (Forbidden)

XHR finished loading: PUT "https://music.my-domain.com/api/playlist/3/sync".

Uncaught (in promise) Object {request: Object, data: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">…my-domain.com Port 443</address>↵</body></html>↵", status: 403, statusText: "Forbidden", ok: false}data: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">↵<html><head>↵<title>403 Forbidden</title>↵</head><body>↵<h1>Forbidden</h1>↵<p>You don't have permission to access /api/playlist/3/sync↵on this server.<br />↵</p>↵<hr>↵<address>Apache/2.4.18 (Ubuntu) Server at music.my-domain.com Port 443</address>↵</body></html>↵"headers: (e)ok: falserequest: Objectstatus: 403statusText: "Forbidden"__proto__: Object

Error in Chrome Console when try to logout:

DELETE https://music.my-domain.com/api/me 403 (Forbidden)
XHR finished loading: DELETE "https://music.my-domain.com/api/me".
Uncaught (in promise) Object {request: Object, data: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">…my-domain.com Port 443</address>↵</body></html>↵", status: 403, statusText: "Forbidden", ok: false}

My apache config:

ServerName music.my-domain.com
    ServerAlias www.my-domain.com
    DocumentRoot /home/user/public_html/koel
    SSLEngine on
    SSLProxyEngine on
    SSLCertificateFile /etc/fullchain.pem
    SSLCertificateKeyFile /etc/privkey.pem
    SSLOpenSSLConfCmd DHParameters "/etc/dhparam.pem"
    SSLProtocol all -SSLv2 -SSLv3
    SSlCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA;
    SSLHonorCipherOrder on
    Header always set Strict-Transport-Security "max-age=31536000"

    <Directory "/home/user/public_html/koel">
        AllowOverride All
        Require all granted
    </Directory>

    <IfModule mod_xsendfile.c>
        XSendFile on
        XSendFilePath /home/user/music
    </IfModule>

    <Directory />
        Options FollowSymLinks
        AllowOverride All 
    </Directory>
Originally created by @Arendt on GitHub (Apr 6, 2016). Original GitHub issue: https://github.com/koel/koel/issues/294 I use apache and can not add music to my playlist and the logout button does not work. Koel Version: 2.2.0 Error in Chrome Console when try to add music: ``` PUT https://music.my-domain.com/api/playlist/3/sync 403 (Forbidden) XHR finished loading: PUT "https://music.my-domain.com/api/playlist/3/sync". Uncaught (in promise) Object {request: Object, data: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">…my-domain.com Port 443</address>↵</body></html>↵", status: 403, statusText: "Forbidden", ok: false}data: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">↵<html><head>↵<title>403 Forbidden</title>↵</head><body>↵<h1>Forbidden</h1>↵<p>You don't have permission to access /api/playlist/3/sync↵on this server.<br />↵</p>↵<hr>↵<address>Apache/2.4.18 (Ubuntu) Server at music.my-domain.com Port 443</address>↵</body></html>↵"headers: (e)ok: falserequest: Objectstatus: 403statusText: "Forbidden"__proto__: Object ``` Error in Chrome Console when try to logout: ``` DELETE https://music.my-domain.com/api/me 403 (Forbidden) XHR finished loading: DELETE "https://music.my-domain.com/api/me". Uncaught (in promise) Object {request: Object, data: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">…my-domain.com Port 443</address>↵</body></html>↵", status: 403, statusText: "Forbidden", ok: false} ``` My apache config: ``` ServerName music.my-domain.com ServerAlias www.my-domain.com DocumentRoot /home/user/public_html/koel SSLEngine on SSLProxyEngine on SSLCertificateFile /etc/fullchain.pem SSLCertificateKeyFile /etc/privkey.pem SSLOpenSSLConfCmd DHParameters "/etc/dhparam.pem" SSLProtocol all -SSLv2 -SSLv3 SSlCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA; SSLHonorCipherOrder on Header always set Strict-Transport-Security "max-age=31536000" <Directory "/home/user/public_html/koel"> AllowOverride All Require all granted </Directory> <IfModule mod_xsendfile.c> XSendFile on XSendFilePath /home/user/music </IfModule> <Directory /> Options FollowSymLinks AllowOverride All </Directory> ```
kerem closed this issue 2026-02-26 02:32:27 +03:00
Author
Owner

@BernardGoldberger commented on GitHub (Apr 6, 2016):

From the console you should be able to right click the link and open in new tab, it might provide some additional detail for the error.

<!-- gh-comment-id:206361458 --> @BernardGoldberger commented on GitHub (Apr 6, 2016): From the console you should be able to right click the link and open in new tab, it might provide some additional detail for the error.
Author
Owner

@Arendt commented on GitHub (Apr 6, 2016):

First link (https://music.my-domain.com/api/playlist/3/sync):

MethodNotAllowedHttpException in compiled.php line 8754:
in compiled.php line 8754
at RouteCollection->methodNotAllowed(array('PUT')) in compiled.php line 8750
at RouteCollection->getRouteForMethods(object(Request), array('PUT')) in compiled.php line 8728
at RouteCollection->match(object(Request)) in compiled.php line 8095
at Router->findRoute(object(Request)) in compiled.php line 8043
at Router->dispatchToRoute(object(Request)) in compiled.php line 8038
at Router->dispatch(object(Request)) in compiled.php line 2381
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3214
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9765
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9755
at Pipeline->then(object(Closure)) in compiled.php line 2328
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2312
at Kernel->handle(object(Request)) in index.php line 53

Second link (https://music.my-domain.com/api/me):

MethodNotAllowedHttpException in compiled.php line 8754:
in compiled.php line 8754
at RouteCollection->methodNotAllowed(array('POST', 'PUT', 'DELETE')) in compiled.php line 8750
at RouteCollection->getRouteForMethods(object(Request), array('POST', 'PUT', 'DELETE')) in compiled.php line 8728
at RouteCollection->match(object(Request)) in compiled.php line 8095
at Router->findRoute(object(Request)) in compiled.php line 8043
at Router->dispatchToRoute(object(Request)) in compiled.php line 8038
at Router->dispatch(object(Request)) in compiled.php line 2381
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3214
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9765
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9755
at Pipeline->then(object(Closure)) in compiled.php line 2328
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2312
at Kernel->handle(object(Request)) in index.php line 53
<!-- gh-comment-id:206368015 --> @Arendt commented on GitHub (Apr 6, 2016): First link (https://music.my-domain.com/api/playlist/3/sync): ``` MethodNotAllowedHttpException in compiled.php line 8754: in compiled.php line 8754 at RouteCollection->methodNotAllowed(array('PUT')) in compiled.php line 8750 at RouteCollection->getRouteForMethods(object(Request), array('PUT')) in compiled.php line 8728 at RouteCollection->match(object(Request)) in compiled.php line 8095 at Router->findRoute(object(Request)) in compiled.php line 8043 at Router->dispatchToRoute(object(Request)) in compiled.php line 8038 at Router->dispatch(object(Request)) in compiled.php line 2381 at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3214 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9765 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9755 at Pipeline->then(object(Closure)) in compiled.php line 2328 at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2312 at Kernel->handle(object(Request)) in index.php line 53 ``` Second link (https://music.my-domain.com/api/me): ``` MethodNotAllowedHttpException in compiled.php line 8754: in compiled.php line 8754 at RouteCollection->methodNotAllowed(array('POST', 'PUT', 'DELETE')) in compiled.php line 8750 at RouteCollection->getRouteForMethods(object(Request), array('POST', 'PUT', 'DELETE')) in compiled.php line 8728 at RouteCollection->match(object(Request)) in compiled.php line 8095 at Router->findRoute(object(Request)) in compiled.php line 8043 at Router->dispatchToRoute(object(Request)) in compiled.php line 8038 at Router->dispatch(object(Request)) in compiled.php line 2381 at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3214 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9765 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9755 at Pipeline->then(object(Closure)) in compiled.php line 2328 at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2312 at Kernel->handle(object(Request)) in index.php line 53 ```
Author
Owner

@BernardGoldberger commented on GitHub (Apr 6, 2016):

I would start by running gulp and clearing the page cache (not sure if that part is necessary but wouldn't hurt).

<!-- gh-comment-id:206433014 --> @BernardGoldberger commented on GitHub (Apr 6, 2016): I would start by running `gulp` and clearing the page cache (not sure if that part is necessary but wouldn't hurt).
Author
Owner

@phanan commented on GitHub (Apr 6, 2016):

From the console you should be able to right click the link and open in new tab, it might provide some additional detail for the error.

Not for non-GET actions (hence the next errors provided by @Arendt, as playlist/sync is a PUT, and log out is a DELETE).

My guess is something went wrong with the session. Try por… ahem, icognito mode, and see if it works?

<!-- gh-comment-id:206435126 --> @phanan commented on GitHub (Apr 6, 2016): > From the console you should be able to right click the link and open in new tab, it might provide some additional detail for the error. Not for non-GET actions (hence the next errors provided by @Arendt, as `playlist/sync` is a `PUT`, and log out is a `DELETE`). My guess is something went wrong with the session. Try por… ahem, icognito mode, and see if it works?
Author
Owner

@Arendt commented on GitHub (Apr 6, 2016):

Same error with incognito mode

<!-- gh-comment-id:206450487 --> @Arendt commented on GitHub (Apr 6, 2016): Same error with incognito mode
Author
Owner

@phanan commented on GitHub (Apr 7, 2016):

Seems like an error with your Apache conf. Try using a tool like Postman and do the requests manually?

<!-- gh-comment-id:206791586 --> @phanan commented on GitHub (Apr 7, 2016): Seems like an error with your Apache conf. Try using a tool like Postman and do the requests manually?
Author
Owner

@phanan commented on GitHub (Apr 14, 2016):

Closing due to inactivity.

<!-- gh-comment-id:209781340 --> @phanan commented on GitHub (Apr 14, 2016): Closing due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#211
No description provided.