Sentora Support Forums

Full Version: Need assistance with .htaccess on a subdomain with NextCloud
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The title sort of covers it. I have been banging my head against the wall with NextCloud. Everything is on a dedicated server and NextCloud works just fine if I do not try to have the .htaccess remove the "index.php" entry from its addresses for "pretty links."

Here is where I think I am at.

There is nothing wrong with NextCloud's .htaccess when I update it for removing the index.php - it looks like this:

Code:
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE #### ErrorDocument 403 /core/templates/403.php ErrorDocument 404 /core/templates/404.php <IfModule mod_rewrite.c>  Options -MultiViews  RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]  RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]  RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$  RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$  RewriteCond %{REQUEST_FILENAME} !/remote.php  RewriteCond %{REQUEST_FILENAME} !/public.php  RewriteCond %{REQUEST_FILENAME} !/cron.php  RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php  RewriteCond %{REQUEST_FILENAME} !/status.php  RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php  RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php  RewriteCond %{REQUEST_FILENAME} !/updater/  RewriteCond %{REQUEST_FILENAME} !/ocs-provider/  RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*  RewriteRule . index.php [PT,E=PATH_INFO:$1]  RewriteBase /  <IfModule mod_env.c>    SetEnv front_controller_active true    <IfModule mod_dir.c>      DirectorySlash off    </IfModule>  </IfModule> </IfModule>

To me, that looks proper and is backed up by everyone over in the NextCloud forums as being A-OK. I have also tried a number of variations from online and all of them fail. I get returned from NextCloud like these:

*forum image linking not working*

First attempt to navigate after .htaccess is updated.

and

Attempt to navigate to a folder in NextCloud with the updated .htaccess.

After all of the time put in this, I am at a point I am pretty positive it is Apache related and also Sentora related. I have the NextCloud site on a subdomain in Sentora (cloud.example.com) - I am pretty convinced considering my work with NextCloud and not finding a solution that it is something in the Sentora Vhosts or perhaps Global Sentora Config.

Can anyone point me in the right direction? As I mentioned after all the time put into this the only thing left is that it has to be a setting in Sentora Apache/php configuration. I have too much time in this simple issue to give up now, I want the "index.php" removed from my web addresses in NextCloud and I will settle for no less!  Undecided
Not sure buddy Sad
Make sure AllowOveride = All in httpd.conf
Check to see if it is also anywhere else in your configs..?
(03-04-2017, 12:57 PM)TGates Wrote: [ -> ]Not sure buddy Sad
Make sure AllowOveride = All in httpd.conf
Check to see if it is also anywhere else in your configs..?

Yeah, I was hoping too that it was just a missing AllowOverride = All statement, but it is in there.

Thanks for commenting. This is such a strange issue - maybe a permissions thing; I will spin up a VM and see what happens.
Right on, good luck!