I have a default drupal 8 site install and a sub directory site install. The second Drupal site was an after thought and had to be hosted on the default site url in a sub folder. both sites share the same database with the second site having a prefix for its tables.
The issue i am experiencing with the second site, the landing page works perfectly but any other page gives an issue, oddly enough when i view on incognito the other pages work but when i refresh i get the 502 Bad Gateway error.
folder structure is as follows
htdocs - core - libraries - modules - node_modules - profiles - sites - themes (custom default theme here) - vendor - site2 (where i installed the second site with its own custom theme) - default drupal files (index.php, .htaccess ....)
I didn't change anything in both .htaccess files, i also tried in site2 .htaccess uncommented and updated the RewriteBase /site2 but still get the 502.
If someone could point me to the right direction regarding this issue, i have googled and tried numerous changes to the .htaccess files.