Apache with Nginx SSL Reverse Proxy in front

Hi all,

im on Ubuntu 16.04 + Nginx1.10.0+ Apache 2.4.18 + PHP7
I have been trying for hours to get this work and have been unsuccessful. Im not very nix and proxy savvy yet but i manage to get all my other sites working (virtualbox, phpmyadmin and other reverse proxy sites). Im sure im missing some obvious step because im still a newb to the nix and proxy world…

the current error im getting is GET https://nextcloud.saitohhome.com/index.php net::ERR_TOO_MANY_REDIRECTS

What i want to achieve is Nginx SSL redirect to Apache in HTTP. I used the same conf setup as my other sites for nginx

Nginx/Apache config files
http://pastebin.com/mygqpwAQ`

My PHP ModulesLoaded

PHP Modules
Core
curl
date
dom
filter
gd
hash
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
readline
Reflection
session
SimpleXML
soap
SPL
standard
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib

Zend Modules
Zend OPcache

I also tried this guide partially https://www.linuxbabe.com/cloud-storage/setup-nextcloud-server-ubuntu-16-04-apache-mariadb-php7

But since i want to redirect fron nginx to apache, i dont think the guide was meant for what i wanted to achieve.

Thanks

I think that is the issue. Which One do you want to use? Nginx or Apache?

Actually, it’s a common and well performing setup, using NGINX as a reverse proxy for static content and delegating PHP processing to Apache.

ok…so i tried just local access

my nginx is on port 80 and apache is on 8080
first i tested my phpvirtualbox

srv-saitoh-app/phpvirtualbox/ – works
srv-saitoh-app:8080/phpvirtualbox/ – works

Nextcloud

srv-saitoh-app/nextcloud – Blank page
srv-saitoh-app:8080/nextcloud – redirects to srv-saitoh-app/index.php – nginx 404 Not Found

case closed…it wasnt working because i used a simlink to add nextcloud folder to the www folder