-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Rewrite Rule sample typo error #1069
Comments
@JochenHWezel Could you directly change it in https://github.com/nextcloud/documentation/edit/master/admin_manual/issues/general_troubleshooting.rst. Then we can directly take the changes and don't need to redo them. Thanks :) |
The link to this is also at the top of every documentation page 😉 |
@MorrisJobke sorry - I don't find the reuqired spare time for this handling with sources and forks etc. - could you please do it? |
My intention was to guide you, because it isn't really that hard anymore. You literally click that link I posted (or in the documentation at the top), then you do the change and you press "Save" together with a message why this change was made. No need to handle forks or check out files locally. 😉 |
Fix is in #1100 |
@MorrisJobke It would be nice if it could be that easy! Currently and with the given link, I just see |
Ah - okay. But then this is the only additional click you need to do. Github does the forking for you and after the change is merged you can delete the forked repository again. Anyways - thanks for the hint and the update. |
Hi, I am using Nextcloud 15.0.4, and I actually need to not have these slashes to get the rewrite rules to work. I am using Apache on Uberspace version 7. |
@JochenHWezel Did you upgrade to Nextcloud 15 in the meantime? Do you have anything else in your .htaccess? |
@blipp In fact, Nextcloud 15 already runs productive on my server for several weeks. This is my current site confguration file, but there is no additional change regarding rewrite rules except that I prefer 302 redirects instead of 301 redirects. <IfModule mod_ssl.c>
<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin admin@myserver.de
DocumentRoot /var/www/cloud_webroot
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
SSLCertificateFile /etc/letsencrypt/live/cloud.myserver.de/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/cloud.myserver.de/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ServerName cloud.myserver.de
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
Header always set Referrer-Policy "same-origin"
</IfModule>
RewriteEngine on
RewriteRule ^/\.well-known/host-meta /cloud/public.php?service=host-meta [QSA,L]
RewriteRule ^/\.well-known/host-meta\.json /cloud/public.php?service=host-meta-json [QSA,L]
RewriteRule ^/\.well-known/webfinger /cloud/public.php?service=webfinger [QSA,L]
RewriteRule ^/\.well-known/carddav /cloud/remote.php/dav/ [R=302,L]
RewriteRule ^/\.well-known/caldav /cloud/remote.php/dav/ [R=302,L]
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
</IfModule> |
The forward slashes are only needed if the rewrite rules are being put directly into the config file of the apache virtual host. They should not be added to the .htaccess file, as in this case the redirect is not working (this has been tested by me on multiple systems). You can also see in the discussion of the bug report #1069 after it was merged, that the reporter actually put the rules into his apache conf, instead of a .htaccess and that somebody else was reporting, that it was only working without the forward slashes in a .htaccess file.
The forward slashes are only needed if the rewrite rules are being put directly into the config file of the apache virtual host. They should not be added to the .htaccess file, as in this case the redirect is not working (this has been tested by me on multiple systems). You can also see in the discussion of the bug report #1069 after it was merged, that the reporter actually put the rules into his apache conf, instead of a .htaccess and that somebody else was reporting, that it was only working without the forward slashes in a .htaccess file.
At https://docs.nextcloud.com/server/14/admin_manual/issues/general_troubleshooting.html#service-discovery there is a typo
needs to be
Only with the / in the beginning, the rules are working.
The text was updated successfully, but these errors were encountered: