Closed pgerundt closed 4 years ago
Versuch A: Neues Valet-Projektverzeichnis (
contao
) anlegen undcontao-manager.phar
dorthin kopieren, in.phar.php
umbenennen.
You need to create a web/
subdirectory in your target directory for the Contao installation. See the instruction on https://contao.org/en/download.html and the official manual.
http://contao.test/contao-manager.phar.php/
weitergeleitet; Prüfung durchBasicValetDriver::isStaticFile()
liefertfalse
zurück; Valet gibt 404 zurück.
Ah, you seem to have the same problem that I recently encountered, though in my case it is an Apache web server. Basically the web server is configured in a way, that URLs like https://example.com/foobar.php/lorem/ipsum/dolor
aren't processed by PHP, i.e. URLs that point to a physical PHP file within the path fragments. I haven't figured out yet which config that is for Apache. Something similar needs to be configured in your case as well, probably.
But this is probably something you should ask in the Laravel community, as it is not related to Contao or the Contao Manager.
Versuch A: Neues Valet-Projektverzeichnis (
contao
) anlegen undcontao-manager.phar
dorthin kopieren, in.phar.php
umbenennen.You need to create a
web/
subdirectory in your target directory for the Contao installation. See the instruction on https://contao.org/en/download.html and the official manual.
See attempt B. Does not work with Valet either.
See attempt B. Does not work with Valet either.
Yes, see new comment :)
Ah, you seem to have the same problem that I recently encountered, though in my case it is an Apache web server. Basically the web server is configured in a way, that URLs like
https://example.com/foobar.php/lorem/ipsum/dolor
aren't processed by PHP, i.e. URLs that point to a physical PHP file within the path fragments. I haven't figured out yet which config that is for Apache. Something similar needs to be configured in your case as well, probably.But this is probably something you should ask in the Laravel community, as it is not related to Contao or the Contao Manager.
100% consent. I just wanted to make sure beforehand that it is no issue with the Contao Manager - because only /api
requests result in a 404.
Fair enough 👍 . You could confirm that it's a general web server issue by creating your own PHP file, e.g. foobar.php
, in the document root of one of your domains, with a simple echo and then access https://example.com/foobar.php/lorem/ipsum/dolor
.
If you do find out, make sure to mention it here - or better yet, create a PR for the official manual :)
Fair enough 👍 . You could confirm that it's a general web server issue by creating your own PHP file, e.g.
foobar.php
, in the document root of one of your domains, with a simple echo and then accesshttps://example.com/foobar.php/lorem/ipsum/dolor
.If you do find out, make sure to mention it here - or better yet, create a PR for the official manual :)
Oh, it's no general web server issue.
If you create an index.php
file, you can call it successfully with domain.test/index.php/foo/bar
or domain.test/foo/bar
- because that's how laravel projects work.
But if you rename that file to test.php
, Valet (!) gives you a 404.
But calling http://contao.test/contao-manager.phar.php/api/session
gives you a 404 saying
Oops! An Error Occurred
The server returned a "404 Not Found".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
And this error messages comes from the contao manager, or am i wrong?
But if you rename that file to
test.php
, Valet (!) gives you a 404.
Then it is a general web server issue and not related to the Contao Manager. You need to configure your web server, so that this works for arbitrary PHP files.
Then it is a general web server issue and not related to the Contao Manager. You need to configure your web server, so that this works for arbitrary PHP files.
I totally agree with you that there is an issue with Valet's ContaoValetDriver
not being able to route requests to the contao-manager.phar.php
. I will open an issue in laravel/valet about that.
But regarding the 404 respectively configuring the web server:
I was just wondering if anyone ever got the Contao Manager running on Laravel Valet.
I'm closing this as it does not seem to be a Manager issue. Feel free to continue the discussion here or in the valet issue 🙃
Hallo Entwicklergemeinde! Hat irgendjemand den CM schon unter Laravel Valet (nginx) zum Laufen gebracht? Meine kläglichen Versuche bisher:
Versuch A: Neues Valet-Projektverzeichnis (
contao
) anlegen undcontao-manager.phar
dorthin kopieren, in.phar.php
umbenennen. Ergebnis: DerBasicValetDriver
wird verwendet; Aufruf vonhttp://contao.test/contao-manager.phar.php
wird von der Funktionrewrites()
nachhttp://contao.test/contao-manager.phar.php/
weitergeleitet; Prüfung durchBasicValetDriver::isStaticFile()
liefertfalse
zurück; Valet gibt 404 zurück.Versuch B: Neues Valet-Projektverzeichnis (
contao
) mit Unterverzeichnisweb
anlegen undcontao-manager.phar
dorthin kopieren, in.phar.php
umbenennen. Ergebnis : siehe Versuch AVersuch C: Neues Valet-Projektverzeichnis (
contao
) mit leeren Verzeichnissen/vendor/contao
anlegen; Unterverzeichnisweb
mit leererapp.php
anlegen undcontao-manager.phar
dorthin kopieren, in.phar.php
umbenennen. Ergebnis: DerContaoValetDriver
wird verwendet; bei Aufruf vonhttp://contao.test/contao-manager.phar.php
wird (fälschlicherweise) dieapp.php
ausgeführt.Versuch D: wie Versuch C; mit zusätzlicher Anpassung (wird später mal ein Custom Valet Driver) von
ContaoValetDriver::frontControllerPath()
:Ergebnis: Der
ContaoValetDriver
wird verwendet; Aufruf vonhttp://contao.test/contao-manager.phar.php
wird weitergeleitet nachhttp://contao.test/contao-manager.phar.php/#/discover
; Requests für Stylesheets (/css
), JavaScript-Chunks (/js
) und Bilder (/img
) funktionieren, aber alle Requests auf die API (/api
) kommen mit 404 zurück; Meldung istERROR 404 Unerwarteter API-Status
. Fehlermeldung im Log:app.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /contao-manager.phar.php/api/session"
Suche im Forum, Internet und hier brachte leider keine Lösung.