Closed triaqu closed 4 years ago
Please tell me which caddy version you are using.
Caddy v1.0.3
Ok, I just tried to install the same caddy version and it works without any issue. Please post here your Caddyfile and tell me when this error occurs.
OS Debian 9 php 7.0
Caddyfile mydomain:443 { root /var/www/MediaDownloader/public tls my_key my_crt fastcgi / /var/run/php/php7.0-fpm.sock { ext .php split .php index index.php } }
'root@localhodt:/var/www/MediaDownloader# composer install Deprecation warning: Your package name kallys/MediaDownloader is invalid, it should not contain uppercase characters. We suggest using kallys/media-downloader instead. Make sure you fix this as Composer 2.0 will error. Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing to install or update Generating autoload files root@localhost:/var/www/MediaDownloader# composer update Deprecation warning: Your package name kallys/MediaDownloader is invalid, it should not contain uppercase characters. We suggest using kallys/media-downloader instead. Make sure you fix this as Composer 2.0 will error. Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files root@localhost:/var/www/MediaDownloader# php index.php <!DOCTYPE html>
Ok, thanks.
Few things to progress:
composer install
in folder containing composer.json
(MediaDownloader/
not MediaDownloader/public
)php index.php
but use your web server instead: execute caddy
inside MediaDownloader/public
folderHi.
Actually I run the composer in the folder of MediaDownloader and running the php is because the page localhost\install not found in the web browser.
Hi, you're right composer
should have complained about composer.json
file if you weren't in right directory. Moreover, error logs indicate that FatFree is already installed.
Then, the next thing you need to do is to tell caddy
that all URL should be rewrote to index.php. Moreover, you can add some logging lines if things don't go as expected:
mydomain:443 {
root /var/www/MediaDownloader/public
tls my_key my_crt
log stdout
errors stderr
fastcgi / /var/run/php/php7.0-fpm.sock {
ext .php
split .php
index index.php
}
rewrite {
to {path} /index.php?{path}&{query}
}
}
Next, if things still does not work, you can paste your caddy
logs here (please use the "Insert code" syntax for better readability).
Yes,it work.
Thank you.
</html>session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/MediaDownloader/sources/lib/composer/bcosca/fatfree-core/base.php:1670) [/var/www/MediaDownloader/sources/app/lib/session.php:34] Base->clear() [/var/www/MediaDownloader/sources/app/lib/alerter.php:39] App\Lib\Session->Clear() [/var/www/MediaDownloader/sources/app/lib/alerter.php:41] Base->mutex() [/var/www/MediaDownloader/temp/1pv1bcbmkkohu.3pxdgdmcml0k4.php:50] App\Lib\Alerter::GetMessages() [/var/www/MediaDownloader/temp/1pv1bcbmkkohu.31g6l0jjtckk4.php:1] Preview->render() [/var/www/MediaDownloader/sources/app/controllers/install.php:22] Preview->render() [/var/www/MediaDownloader/sources/app/app.php:147] Base->run() [index.php:7] App\App->Run() <!DOCTYPE html>