I have noticed some people recommending NGINx over Apache for NextCloud. I understand that using either is choice made under given circumstances. But I am interested to know what those would be based on your experiences.
Why would NGINX be a more suited candidate for Nextcloud if at all?
I am by no means a day time server admin. So, obviously I feel its not wise to spend time learning NGINX when I could better spend my fun-time learning some other UNIX program. After all going deep into NGINX as well as APACHE is redundant knowledge for a hobbyist. This is my view based on my circumstances.
I think most people use what they know best. I had some experience with Apache already, so that’s what I went with.
Nginx recently had a major security vulnerability with Nextcloud. Nextcloud’s documentation also indicates it isn’t safe to install Nextcloud in the web root of a nginx server. Would that have made me switch if I were a nginx user? Probably not, I would just patch the vulnerability and not install at the web root.
People have a lot of opinions about whether one or the other is more suited to a particular facet of Nextcloud’s operation. At the end of the day, they both do the job when configured appropriately, so use whichever you want.
That’s literally all there is to it. That’s using Caddy v1. Caddy v2 is about to be released and I believe the Caddyfile block will distill down even further, possibly to a single line that looks something like this:
I read and its very short… they quote another site in your site :
I find it more fair and complete.
Moreover, the author said that apache is more secure but there is no argument…
The only argument in favor of apache is that you need to compile all if you want to add some modules. But the apt repository include a lot of modules (nginx-extras or nginx-full).
Just a comment from a none IT “expert” : I have learnt as much of Apache that was needed to install and run Nextcloud. I haven’t experienced any problems and in line with your comment above, why indeed spend more time learning another server when what we have works. I have considered NGINX but I see nothing that would justify a change.
There is good information from the above answers and also on the web for anyone to make an informed choice if starting from scratch.
In regards to nextcloud – it’s actually easy to switch between the two (Apache and nginx). I switched to nginx since in most of my other server applications which required a reverse proxy, I was becoming more familiar with the nginx syntax overtime. I believe in terms of performance there may be some advantages using nginx as a reverse proxy as compared to Apache in terms of number of threads that can be used.
In terms of security – there are always concerns since Nginx was developed inside of Russia, and now the Russian government is suing the nginx corporation due to theft of intellectual property. Whether this ends up harming nginx in any way is unknown but some might use this as a potential concern.