You are not logged in.
Hello-
I've followed the Arch Nextcloud wiki (https://wiki.archlinux.org/title/Nextcloud) best I could, and after overcoming several obstacles and typos have been stuck for a long time trying to troubleshoot the following problem.
Apache is up and running, https works. Nextcloud is to hosted out of a folder (rather than a subdomain).
uwsgi instance is up and running, and receiving requests on its socket via the nextcloud alias in apache httpd.conf.
Nextcloud data dir and doc root are in the default locations (/var/lib/nextcloud/data and /usr/share/webapps/nextcloud)
These are defined in the uwsgi nextcloud ini file:
[dylan@storage01 uwsgi]$ grep -e cloud_data_dir -e php-docroot nextcloud.ini | grep -v \#
cloud_data_dir = /var/lib/nextcloud/data
chdir = %(cloud_data_dir)
php-docroot = /usr/share/webapps/%n
[dylan@storage01 uwsgi]$ I do NOT have php configured on apache server, as my understanding (right or wrong) is that I only need PHP enabled for uwsgi.
However any requests I make receive 404 not found errors, including
https://mywebsite.net/nextcloud
https://myqebsite.net/nextcloud/
https://mywebsite.net/nextcloud/status.php
I'm suspicious it has to do with the SetHandler line within my apache config, as I can't find details on this syntax and the uwsgi syntax for requested path in its logs confuses me when comparing to docroot.
SetHandler "proxy:unix:/run/uwsgi/nextcloud.sock|uwsgi://localhost/"Thoughts?
Thank you--
*** Starting uWSGI 2.0.31 (64bit) on [Sat May 16 01:16:47 2026] ***
compiled with version: 15.2.1 20251112 on 16 December 2025 09:14:25
os: Linux-6.19.14-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 23 Apr 2026 06:57:02 +0000
nodename: storage01
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /
detected binary path: /usr/bin/uwsgi
chdir() to /var/lib/nextcloud/data
your processes number limit is 62795
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /run/uwsgi/nextcloud.sock fd 7
setgid() to 968
setuid() to 968
--- PHP custom config ---
date.timezone=America/Los_Angeles
open_basedir=/var/lib/nextcloud:/tmp:/usr/share/webapps/nextcloud:/etc/webapps/nextcloud:/dev/urandom:/usr/lib/php-legacy/modules:/var/log/nextcloud:/proc/meminfo:/proc/cpuinfo
session.save_path=/tmp
session.gc_maxlifetime 21600
session.gc_divisor 500
session.gc_probability 1
post_max_size=1000M
upload_max_filesize=1000M
always_populate_raw_post_data=-1
max_input_time=120
max_execution_time=60
memory_limit=768M
zend_extension=opcache
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
extension=apcu
extension=bcmath
extension=bz2
extension=curl
extension=exif
extension=ftp
extension=gd
extension=gmp
extension=imagick
extension=intl
extension=iconv
extension=ldap
extension=pdo_mysql
extension=sockets
extension=sysvsem
extension=zip
extension=sodium
--- end of PHP custom config ---
PHP document root set to /usr/share/webapps/nextcloud
PHP Warning: Module "curl" is already loaded in Unknown on line 0
PHP Warning: Module "pdo_mysql" is already loaded in Unknown on line 0
PHP Warning: Module "zip" is already loaded in Unknown on line 0
PHP 8.3.28 initialized
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 802120 bytes (783 KB) for 10 cores
*** Operational MODE: preforking ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 45559)
spawned uWSGI worker 1 (pid: 45560, cores: 1)
spawned uWSGI worker 2 (pid: 45561, cores: 1)
spawned uWSGI worker 3 (pid: 45562, cores: 1)
spawned uWSGI worker 4 (pid: 45563, cores: 1)
[pid: 45561|app: -1|req: -1/1] 104.132.66.109 () {136 vars in 2285 bytes} [Sat May 16 01:17:56 2026] GET /nextcloud/ => generated 9 bytes in 0 msecs (HTTP/1.1 404) 2 headers in 71 bytes (0 switches on core 0)
[pid: 45562|app: -1|req: -1/2] 104.132.66.109 () {136 vars in 2298 bytes} [Sat May 16 01:18:01 2026] GET /nextcloud/status.php => generated 9 bytes in 0 msecs (HTTP/1.1 404) 2 headers in 71 bytes (1 switches on core 0)
[pid: 45561|app: -1|req: -1/3] 104.132.66.109 () {154 vars in 2540 bytes} [Sat May 16 01:24:09 2026] GET /nextcloud => generated 9 bytes in 0 msecs (HTTP/1.1 404) 2 headers in 71 bytes (1 switches on core 0)Offline
So, i set up FPM as the app server, and changed only the proxy line in my apache config to user FPM...
now nextcloud works fine- which rules out the nextcloud config, mysql, and perhaps the apache config outside of the proxy handoff.
Although I swear the first time i tried site.com/nextcloud, the browser loaded the php in text rather than running it- and then i pointed directly to site.com/nextcloud/index.php and the app loaded...
But now it loads when just visiting site.com/nextcloud.
In the next few weeks I hope to see if i can troubleshoot uwsgi install more; I poured over trying to figure out extra logging, etc for uwsgi for hours and didn't get anywhere. That said, i really don't understand exactly how the handoffs are supposed to be happening vs actually happening apache <->nextcloud via the proxy anyway..
it appears like the get request from apache to uwsgi is for /nextcloud - but nextcloud doesn't find anything there... wherever 'there' is haha (the place it chdir'd to in uwsgi's nextcloud.ini? The document root in nextcloud.ini?)
From the uwsgi log:
[pid: 45561|app: -1|req: -1/3] 104.132.66.109 () {154 vars in 2540 bytes} [Sat May 16 01:24:09 2026] GET /nextcloud => generated 9 bytes in 0 msecs (HTTP/1.1 404) 2 headers in 71 bytes (1 switches on core 0)However i would have thought the GET being forwarded would be for index.php due to site not having a file extension, and the Directory section of apache config having DirectoryIndex set to index.php and index.html
<Directory /usr/share/webapps/nextcloud>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
DirectoryIndex index.php index.html
...
...
...Just in case, i did try site.com/nextcloud/ as well with similar results
[pid: 45561|app: -1|req: -1/1] 104.132.66.109 () {136 vars in 2285 bytes} [Sat May 16 01:17:56 2026] GET /nextcloud/ => generated 9 bytes in 0 msecs (HTTP/1.1 404) 2 headers in 71 bytes (0 switches on core 0)Offline