server
server copied to clipboard
[Bug]: AH01276: Cannot serve directory: No matching DirectoryIndex (v24)
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
Nextcloud Upgrade to version 24 (tried latest and stable) results in::
AH01276: Cannot serve directory /var/www/html/apps/files/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
I have looked over the internet for this issue, and I seem to be the only one. I stepped on some pretty url fix but that did not work. This is docker afterall it should be easier than this to upgrade.
Full log:
[Wed Aug 03 22:18:31.388398 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.54 (Debian) PHP/8.0.21 configured -- resuming normal operations
[Wed Aug 03 22:18:31.388429 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
172.25.0.2 - Max [03/Aug/2022:22:18:38 -0700] "GET /status.php HTTP/1.1" 200 1033 "-" "Mozilla/5.0 (Windows) mirall/3.5.3stable-Win64 (build 20220729) (Nextcloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
[Wed Aug 03 22:18:58.420879 2022] [autoindex:error] [pid 30] [client 172.25.0.2:47272] AH01276: Cannot serve directory /var/www/html/apps/files/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
172.25.0.2 - - [03/Aug/2022:22:18:58 -0700] "GET /apps/files/?dir=/&fileid=178 HTTP/1.1" 403 652 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
Edit: I notice that i went from major version 22 to 24, however the upgrade proceeded and downgrading is not possible. I get Can't start Nextcloud because the version of the data (24.0.3.2) is higher than the docker image version (23.0.7.2) and downgrading is not supported. Are you sure you have pulled the newest image version?
So since this is not allowed my installation gets bricked? Why does the upgrade proceed if its not allowed to upgrade multiple major versions?
Ive tried forcing the upgrade to continue in the container as well:
www-data@f5b31e0a2a3f:~/html$ php -d memory_limit=-1 -f /var/www/html/occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed
Maintenance mode is kept active
Resetting log level
Edit2: I have decided to try a fresh installation so i just renamed my volumes and pointed at stable image using this docker-compose:
app:
image: nextcloud:stable #Upgrading nextcloud from 22.1.1.2 ...
container_name: nextcloud-app
networks:
- nextcloud_network
depends_on:
- acme
- proxy
- db
volumes:
- nextcloud24:/var/www/html
- config24:/var/www/html/config
- apps24:/var/www/html/custom_apps
- data24:/var/www/html/data
- themes24:/var/www/html/themes
- /etc/localtime:/etc/localtime:ro
There is now no data in the volumes as i renamed them they are new volumes however the error i get is the same:
root@eschaton:/opt/nextcloud# docker logs --since 1h --follow nextcloud-app
Initializing nextcloud 24.0.3.2 ...
New nextcloud instance
Initializing finished
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.25.0.10. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.25.0.10. Set the 'ServerName' directive globally to suppress this message
[Wed Aug 03 23:14:40.313137 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.54 (Debian) PHP/8.0.21 configured -- resuming normal operations
[Wed Aug 03 23:14:40.313165 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
[Wed Aug 03 23:15:36.741729 2022] [autoindex:error] [pid 69] [client 172.25.0.2:32928] AH01276: Cannot serve directory /var/www/html/apps/files/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
172.25.0.2 - - [03/Aug/2022:23:15:36 -0700] "GET /apps/files/?dir=/&fileid=178 HTTP/1.1" 403 652 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
172.25.0.2 - Max [03/Aug/2022:23:17:32 -0700] "GET /status.php HTTP/1.1" 200 1218 "-" "Mozilla/5.0 (Windows) mirall/3.5.3stable-Win64 (build 20220729) (Nextcloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.25.0.2 - Max [03/Aug/2022:23:17:32 -0700] "PROPFIND /remote.php/dav/files/Max/ HTTP/1.1" 302 513 "-" "Mozilla/5.0 (Windows) mirall/3.5.3stable-Win64 (build 20220729) (Nextcloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.25.0.2 - Max [03/Aug/2022:23:17:32 -0700] "PROPFIND /index.php HTTP/1.1" 200 3239 "-" "Mozilla/5.0 (Windows) mirall/3.5.3stable-Win64 (build 20220729) (Nextcloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
[Wed Aug 03 23:17:41.140087 2022] [autoindex:error] [pid 73] [client 172.25.0.2:32936] AH01276: Cannot serve directory /var/www/html/apps/files/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
Steps to reproduce
1.Install older version of nextcloud, I came from version 22 2. docker stop nextcloud 3. docker rm nextcloud 4. docker pull nextcloud:stable 5. docker-compose up -d 6. Experience error in log
Expected behavior
The error to not exist. I did not alter the .htaccess or any config file, i dont know why this would be happening.
Installation method
Official Docker image
Operating system
Debian/Ubuntu
PHP engine version
No response
Web server
No response
Database engine version
No response
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- [ ] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
www-data@f5b31e0a2a3f:~/html$ php -d memory_limit=-1 -f /var/www/html/occ config:list system
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
{
"system": {
"htaccess.RewriteBase": "\/",
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"nextcloud.domain.io"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "22.1.1.2",
"overwrite.cli.url": "http:\/\/nextcloud.domain.io",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"overwriteprotocol": "https",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpsecure": "ssl",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"loglevel": 2,
"maintenance": true
}
}
List of activated Apps
www-data@f5b31e0a2a3f:~/html$ php -d memory_limit=-1 -f /var/www/html/occ app:list
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Enabled:
- accessibility: 1.7.0
- activity: 2.15.0
- apporder: 0.13.0
- breezedark: 22.0.1
- bruteforcesettings: 2.2.0
- calendar: 2.3.4
- circles: 22.1.1
- cloud_federation_api: 1.4.0
- comments: 1.11.0
- contactsinteraction: 1.2.0
- dashboard: 7.1.0
- dav: 1.18.0
- deck: 1.5.3
- documentserver_community: 0.1.11
- federatedfilesharing: 1.11.0
- federation: 1.11.0
- files: 1.16.0
- files_pdfviewer: 2.3.0
- files_rightclick: 1.1.0
- files_sharing: 1.13.2
- files_trashbin: 1.11.0
- files_versions: 1.14.0
- files_videoplayer: 1.11.0
- firstrunwizard: 2.11.0
- logreader: 2.7.0
- lookup_server_connector: 1.9.0
- mail: 1.10.5
- news: 16.0.1
- nextcloud_announcements: 1.11.0
- notes: 4.1.1
- notifications: 2.10.1
- oauth2: 1.9.0
- onlyoffice: 7.1.2
- password_policy: 1.12.0
- photos: 1.4.0
- privacy: 1.6.0
- provisioning_api: 1.11.0
- recommendations: 1.1.0
- serverinfo: 1.12.0
- settings: 1.3.0
- sharebymail: 1.11.0
- spreed: 12.1.2
- support: 1.5.0
- survey_client: 1.10.0
- systemtags: 1.11.0
- text: 3.3.0
- theming: 1.12.0
- twofactor_backupcodes: 1.10.1
- updatenotification: 1.11.0
- user_status: 1.1.1
- viewer: 1.6.0
- weather_status: 1.1.0
- workflowengine: 2.3.1
Disabled:
- admin_audit
- encryption
- files_external
- officeonline: 1.1.1
- user_ldap
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
I ran into the same issue. It is fair to say only one major to the next is valid to upgrade. But then an upgrade should not be attempted, leaving the data corrupted!