Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy problem (overwritewebroot): kills normal oc/nc instance #13

Open
MrFly opened this issue Feb 3, 2019 · 0 comments
Open

Proxy problem (overwritewebroot): kills normal oc/nc instance #13

MrFly opened this issue Feb 3, 2019 · 0 comments

Comments

@MrFly
Copy link

MrFly commented Feb 3, 2019

I'm using this app with the current Nextcloud. Works like a charm (with custom modifications) with a few "but's":

  • Nextcloud blames about wrong upper/lower versions given in appinfo. Should be fixed easy
  • in NC's config.php one has to add a "if", instead of hardcoding "overwritewebroot" to the $CONFIG-array. With the following code the normal NC instance AND roundcube with this plugin works well.
// Write some like this _after_ the $CONFIG definition:
$key = "HTTP_X_FORWARDED_HOST";
if (array_key_exists($key, $_SERVER) && $_SERVER[$key] == "your_rc_fqdn") {

    $CONFIG["overwritewebroot"] = "/cloud";
}

With this snippet, the webroot only will be modified, if NC/OC is included / called from roundcube.

Little problem:
after updates of apps / NC or config changes this may be overwritten. A simple batch script in crontab could help. Its really ugly, but works (for now). Be sure to BACKUP your original config.php first:

// will add the code to the end of config.php
echo "THE_CODE_ABOVE" >> /path/to/nc/config/config.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant