Pretty URLS not working as expected?

New installation as of april 2021. I added the code in the config file:

‘overwrite.cli.url’ => ‘https://mydrive.mydomain.com/’,
‘htaccess.RewriteBase’ => ‘/’,

But it doesn’t seem to kick in. The modules mod_env and mod_rewrite is installed. The URL is still displaying “index.php” in the URL address. The server meets the requirements as per installation guide:
https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html
What am I missing here? :thinking:

Thanks in advance for the help. :smiley:

Kind regards
AngryWarrior

Based on the administrator guide you need to execute an occ command to activate the desired configuration change. Have you done this?

1 Like

Right, I missed that. Thank you for pointing that out @j-ed

We’re using managed VPS servers so (not in-house), so we can’t do that.

Is there a example of the code that is written to the .htaccess file so we can apply it manually?

I imagine that the .htaccess code is quite vanilla/standard to most installations but I could be incorrect of course.:wink:

Kind regards

Unfortunately I cannot answer that question. I would recommend that you ask a person with administrative rights to run the command for you on the servers, if you’re not allowed to do that.

Hmm… :thinking:

It would be much easier to apply this code change manually in .htaccess.

In our case it is our own servers but as they are managed by the hosting company we outsourced to so we do to have access the the root/console.

With NC 24
PHP 8.0
Ubuntu Server 22

With /etc/php/8.0/mods-available/apcu.ini containing:

extension=apcu.so
[apc]
apc.enable_cli=1
apc.shm_size=512M

I then tried adding 8.0 to php, and it worked! After 2 hours of troubleshooting!

sudo -u www-data php8.0 occ maintenance:update:htaccess

I think really important is only the command you posted.

maintenance:update:htaccess Updates the .htaccess file
documentation

1 Like