Solved!!!!!
HELP
i followed the spaceivator tutorial on how to use a reverse proxy but i only get 502 bad gateway
but everything works fine, my swag container is getting certified
my settings
## Version 2021/05/18
# make sure that your dns has a cname set for nextcloud
# assuming this container is called "swag", edit your nextcloud container's config
# located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
# 'trusted_proxies' => ['swag'],
# 'overwrite.cli.url' => 'https://nextcloud.your-domain.com/',
# 'overwritehost' => 'nextcloud.your-domain.com',
# 'overwriteprotocol' => 'https',
#
# Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this:
# array (
# 0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
# 1 => 'nextcloud.your-domain.com',
# ),
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name cloud.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app nextcloud;
set $upstream_port 443;
set $upstream_proto https;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_max_temp_file_size 2048m;
}
}
i change the server name nextcloud to icloud because of my domain name. its cloud.xxxxxxxxx.com
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'datadirectory' => '/data',
'instanceid' => 'xxx',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
array (
0 => '192.168.178.120:444',
1 => 'cloud.xxx-xxx.com',
),
'dbtype' => 'mysql',
'version' => '20.0.2.2',
'trusted_proxies' => ['swag'],
'overwrite.cli.url' => 'https://cloud.xxx-xxx.com/',
'overwritehost' => 'cloud.xxx-xxx.com',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'dbhost' => '192.168.178.120:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'NextCloud',
'dbpassword' => 'xxx-xxx-xxx',
'installed' => true,
'app_install_overwrite' =>
array (
0 => 'keeporsweep',
1 => 'blockscores',
),
'twofactor_enforced' => 'true',
'twofactor_enforced_groups' =>
array (
0 => 'Gebruikers',
1 => 'admin',
),
'twofactor_enforced_excluded_groups' =>
array (
),
'maintenance' => false,
);
i am really lost over here i just don't know what to do now
swag log
Using Let's Encrypt as the cert provider
SUBDOMAINS entered, processing
SUBDOMAINS entered, processing
Only subdomains, no URL in cert
Sub-domains processed are: -d cloud.xxx-xxx.com
E-mail address entered:
[email protected]
http validation is selected
Certificate exists; parameters unchanged; starting nginx
Starting 2019/12/30, GeoIP2 databases require personal license key to download. Please retrieve a free license key from MaxMind,
and add a new env variable "MAXMINDDB_LICENSE_KEY", set to your license key.
[cont-init.d] 50-config: exited 0.
[cont-init.d] 60-renew: executing...
The cert does not expire within the next day. Letting the cron script handle the renewal attempts overnight (2:08am).
[cont-init.d] 60-renew: exited 0.
[cont-init.d] 70-templates: executing...
**** The following nginx confs have different version dates than the defaults that are shipped. ****
**** This may be due to user customization or an update to the defaults. ****
**** To update them to the latest defaults shipped within the image, delete these files and restart the container. ****
**** If they are user customized, check the date version at the top and compare to the upstream changelog via the link. ****
/config/nginx/ssl.conf
/config/nginx/site-confs/default
/config/nginx/proxy.conf
/config/nginx/nginx.conf
/config/nginx/authelia-server.conf
/config/nginx/authelia-location.conf
[cont-init.d] 70-templates: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Server ready
settings nextcloud
settings swag
what i get
if some one knows how to get out of this. that would be really nice thank you so much in advance
with kind regards Pascal
FIXT IT!!!
the problem was that the swag container had already run before i assign a custom network so the /config/nginx/resolver.conf file had the wrong number in it in my case it was 8.8.8.8 8.8.4.4 google dns what you need to do if you have this problem is Delete the file, and restart the container so the file is regenerated