Hello,
I try to coinfigure my Nextcloud instance with a Nginx reverseproxy and apache like back end server.
My apache server have a wrong GET request:
IP of my Nginx Server - - [24/Apr/2019:10:51:57 +0200] “GET /nextcloudindex.php/login HTTP/1.0” 302 -
And in my firefox I have a message dispaly ther is a wrong redirection.
I have read lot of subject in the forum with proxy problem but I don’t find a solution.
I think it’s a problem of configuration but I don’t know if is the Nextcloud config file or my Nginx.
IP Nginx: 37.37.37.37
IP Apache: 47.47.47.47
DNS entry for my nextcloud: https://cloud.tld.fr
My conf Nginx:
> server {
> server_name cloud.tld.fr;
>
>
> location / {
> proxy_pass http://37.37.37.37;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header X-Forwarded-Proto $scheme;
> }
>
> listen 443 ssl; # managed by Certbot
> ssl_certificate /etc/letsencrypt/live/cloud.tld.fr/fullchain.pem; # managed by Certbot
> ssl_certificate_key /etc/letsencrypt/live/cloud.tld.fr/privkey.pem; # managed by Certbot
> include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
> ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
>
> }
My conf Apache:
> <VirtualHost *:80>
> ServerAdmin admin@example.com
> DocumentRoot "/var/www/html/nextcloud/"
> ServerName cloud.tld.fr
> <Directory "/var/www/html/nextcloud/">
> Options MultiViews FollowSymlinks
>
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
> TransferLog /var/log/apache2/nextcloud_access.log
> ErrorLog /var/log/apache2/nextcloud_error.log
> </VirtualHost>
My config.php Nextcloud
<?php $CONFIG = array ( 'instanceid' => '', 'passwordsalt' => ', 'secret' => '', 'trusted_domains' => array ( 0 => 'cloud.tld.fr', ), 'datadirectory' => '', 'dbtype' => 'mysql', 'version' => '15.0.7.0', 'overwrite.cli.url' => 'https://cloud.tld.fr', 'dbname' => '', 'dbhost' => '', 'dbport' => '', 'dbtableprefix' => '', 'dbuser' => '', 'dbpassword' => '', 'installed' => true, 'updater.secret' => '', 'maintenance' => false, 'theme' => '', 'loglevel' => 2, 'mysql.utf8mb4' => true, 'overwritehost' => '', 'trusted_proxies' => ['37.37.37.37'], 'overwriteprotocol' => 'https', 'overwritecondaddr' => '^37\.37\.37\.37$', );
Thanks for the support.
(IP and DNS are not the real… It’s normal)