Cypht - Lightweight open source webmail application written in PHP and JavaScript
-
@necrevistonnezr said in Cypht - Lightweight open source webmail application written in PHP and JavaScript:
copy and paste the public key, get an error [ErrorException] file_put_contents(/root/.config/composer/keys.dev.pub): failed to open stream: No such file or directory
set the HOME=/app/data env var to make this work
LAMP app and terminal session should do that automagically IMO @staff
-
-
I started to create a package in my Repo
- It is not yet working
- PHP needs to be activated in nginx
- The hm3.ini is very basic and needs improvement (missing SMTP config, Database Config, LDAP Config)
- there might be more issues when PHP is running
- easy installer will not be ready before the package is usable
-
Grmpf.... I am totally lost with getting nginx up and running....
I receive these error logs:
root@b64767c7-9e50-475e-9f57-40b454d06b97:/app/code# ./start.sh ==> Starting App 2024-02-06 17:29:06,821 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message. 2024-02-06 17:29:06,824 INFO supervisord started with pid 35 2024-02-06 17:29:07,829 INFO spawned: 'nginx' with pid 46 nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (30: Read-only file system) 2024/02/06 17:29:07 [warn] 46#46: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1 2024/02/06 17:29:07 [emerg] 46#46: mkdir() "/run/client_body" failed (13: Permission denied) 2024-02-06 17:29:07,863 INFO exited: nginx (exit status 1; not expected)
I don't understand why it still tries to use /var/log/nginx/error.log
I am using supervisord to start, in nginx.conf the access and error logs are directed to /run . even in the nginx default I refer to /run for the logging.
I have updated the source in my repo, if someone want to have a look
-
I'm not sure, so genuine question : does
/run/client_body
need to be created in the Dockerfile or start.sh ?The error log is strange as you have set it explicitly.
Is this lineinclude /etc/nginx/conf.d/*.conf;
including a master conf which overrides the nginx.conf ?
Not an nginx expoert, just taking guesses. -
@timconsidine Thanks for sharing ideas, the path
/etc/nginx/conf.d/
is empty -
Hmmm.
I notice that/run/access.log
and/run/error.log
are ownedroot:root
and arerw-r--r--
But processes are running as www-data or cloudron ?
Still just chucking stuff around -
Perhaps it's looking for an environment variable and when not found it uses a default. Set HOME and whatever else nginx looks for with supervisor.
-
Okay, I got one step further after using a symlink in Dockerfile for the error.log
It seems the document root is still broken, because I get
Feb 06 20:22:40=> Healtheck error got response status 502
Okay, this is because of not properly working php
root@da491a6f-01a2-4d9c-859a-e34799e1c3cf:/app/code# tail -f /run/error.log 2024/02/06 19:25:20 [crit] 24#24: *37 connect() to unix:/run/php/php8.1-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 172.18.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1-fpm.sock:", host: "a101.
-
@Kubernetes Can you tell me why cypht requires nginx? You can just modphp like other apps no? Atleast, that's what I see from https://www.cypht.org/install.html . Does it not work in the LAMP app?
As for apache itself, see cryptpad or discourse or nginx. They have a readonly config for nginx. They configure various paths that nginx wants to write to.
-
@Kubernetes hmm, try some debug set commands https://www.baeldung.com/linux/nginx-log-variable-output
this was interesting too:
https://www.baeldung.com/linux/nginx-config-environment-variables
https://stackoverflow.com/questions/21866477/nginx-use-environment-variablesor just stick them in a cyclic
memory:2m
https://adamtheautomator.com/nginx-logs/ -
No luck today, now I just get an error from the App that
Invalid auth configuration
. -
@Kubernetes is that a typo in the start.sh?
#sed -i "s/^imap_auth_tls=.*/imap_auth_tls=${CLOUDRON_EMAIL_IMAPS_PORT}/" /app/data/hm3.ini
IMAP vs IMAPS