Update general_troubleshooting.rst#11394
Conversation
updated steps considering Apache's defaults Signed-off-by: alexknop <knopalex@msu.edu>
There was a problem hiding this comment.
Pull request overview
Updates the Service Discovery troubleshooting steps to better support Apache default setups when Nextcloud is installed in a subfolder.
Changes:
- Clarifies service discovery endpoints for Nextcloud at
DocumentRootvs in a subfolder. - Adds Apache
DocumentRootcontext plus an exampleAllowOverrideconfiguration for subfolder setups. - Tweaks wording/punctuation around the Apache/.htaccess guidance.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| is running at the ``DocumentRoot`` of your Web server the correct URL is | ||
| ``https://example.com/remote.php/dav`` for CardDAV and CalDAV and if running in a | ||
| subfolder like ``nextcloud``, then ``https://example.com/nextcloud/remote.php/dav``. | ||
| subfolder like ``nextcloud``, then the correct URL is ``https://example.com/nextcloud/remote.php/dav``. |
There was a problem hiding this comment.
The new note directive is directly attached to the preceding paragraph. In reStructuredText, directives like .. note:: should be preceded by a blank line (and usually followed by a blank line) to avoid Sphinx formatting warnings and ensure consistent rendering.
| subfolder like ``nextcloud``, then the correct URL is ``https://example.com/nextcloud/remote.php/dav``. | |
| subfolder like ``nextcloud``, then the correct URL is ``https://example.com/nextcloud/remote.php/dav``. |
| ``https://example.com/remote.php/dav`` for CardDAV and CalDAV and if running in a | ||
| subfolder like ``nextcloud``, then ``https://example.com/nextcloud/remote.php/dav``. | ||
| subfolder like ``nextcloud``, then the correct URL is ``https://example.com/nextcloud/remote.php/dav``. | ||
| .. note:: By default, the Apache ``DocumentRoot`` is the directory ``/var/www/html`` |
There was a problem hiding this comment.
The statement about Apache's default DocumentRoot being /var/www/html is distro-specific (e.g., Debian/Ubuntu) and not a universal Apache default. Please qualify this (e.g., “On Debian/Ubuntu…”) or rephrase to avoid giving incorrect guidance on other distributions.
| you're running Apache, create or edit the :file:`.htaccess` file within the | ||
| document root of your Web server and add the following lines:: | ||
| <Directory /var/www/html> | ||
| AllowOverride FileInfo |
There was a problem hiding this comment.
The config snippet uses a tab character for indentation before AllowOverride FileInfo. Tabs can render inconsistently in code blocks and may violate docs style checks; please replace with spaces and keep indentation consistent across the snippet.
| AllowOverride FileInfo | |
| AllowOverride FileInfo |
| In this, we are using the Apache default ``DocumentRoot`` of ``/var/www/html``, but you should change it to whatever your ``DocumentRoot`` is if it differs. | ||
| Next, create or edit the :file:`.htaccess` file within the ``DocumentRoot`` of your Web server and add the following lines:: |
There was a problem hiding this comment.
This paragraph is a single very long line, while the surrounding documentation wraps lines (typically ~80 chars). Please wrap this text to match the file’s existing formatting and keep diffs/readability consistent.
| In this, we are using the Apache default ``DocumentRoot`` of ``/var/www/html``, but you should change it to whatever your ``DocumentRoot`` is if it differs. | |
| Next, create or edit the :file:`.htaccess` file within the ``DocumentRoot`` of your Web server and add the following lines:: | |
| In this, we are using the Apache default ``DocumentRoot`` of | |
| ``/var/www/html``, but you should change it to whatever your | |
| ``DocumentRoot`` is if it differs. Next, create or edit the | |
| :file:`.htaccess` file within the ``DocumentRoot`` of your Web server and | |
| add the following lines:: |
| Web server is using this file. Additionally, you need the mod_rewrite Apache | ||
| module installed and ``AllowOverride All`` set in your :file:`apache2.conf` | ||
| or vHost-file to process these redirects. When running Nginx please refer to | ||
| :doc:`../installation/nginx`. | ||
|
|
||
| For the second case, you need to add the following to :file:`/etc/apache2/apache2.conf`:: | ||
|
|
||
| If your Nextcloud instance is installed in a subfolder called ``nextcloud`` and | ||
| you're running Apache, create or edit the :file:`.htaccess` file within the | ||
| document root of your Web server and add the following lines:: | ||
| <Directory /var/www/html> | ||
| AllowOverride FileInfo | ||
| </Directory> |
There was a problem hiding this comment.
The section now mentions AllowOverride All (for the first case) but later instructs AllowOverride FileInfo (for the second case). Since the second case only needs rewrite directives, consider aligning the guidance (e.g., document the minimum required override class and why) to avoid confusing readers about which value is correct/safe.
updated steps considering Apache's defaults
☑️ Resolves
Provides Service Discovery instructions for users using Apache defaults and have Nextcloud configured in a sub-folder.
-Describes the default DocumentRoot value for Apache
-Provides configuration for the AllowOverride directive for the DocumentRoot directory.
🖼️ Screenshots