Nginx support for nextCloud

This is a packaging thing, and I am not sure about this one. Sure Nginx is popular. But what about Hiawatha, Lighttp, $x, $y and $z? It would then make more sense to not specify any web server at all (or maybe as separate package). This would leave the choice to the admin.

Then, here is my call to all nginx experts to improve the documentation. It resides in a Github repo as well, and for sure will in Nextcloud, too. It’s just text after all. Bugs can be reported against specific problems (content and structure wise) and the nginx related documentation pages can be re-organized and enhanced.

3 Likes

[quote=“erikkn, post:2, topic:369, full:true”]
In my opinion nginx support has to be high priority, because nginx is much better than Apache. In hosting environments many organisations are migrating to nginx.
[/quote]I agree 100%
Also to me the configuration of nginx seems to be easier and more straight forward than apache configuration.

1 Like

my opinion too. I use only nginx

1 Like

How about the installation script looks which server is installed. If none is installed it gives the choice to either use Apache or Nginx.
This should be a possible way to get the best of both worlds. And the user can then choose the server they feel most comfortable with. Let’s face it: “Where it matters” (many, many, and I mean lots of users) there they don’t use apt-get install, they use the tar.gz file.

1 Like

Much better at serving ownCloud pages? Got any proof?

Our test environment:

  • Docker container as virtualisation layer, Nginx 1.10 , PHP7, Redis and MariaDB 10, OC8
  • Docker container as virtualisation layer, Apache , PHP7, Redis and MariaDB 10, OC8

Nginx was serving much better performance, also with heavy load and it is using less memory then Apache. Unfortunately I don’t have statistics anymore, because this was tree months ago.
Please, go check the internet, like safaribooks, where you can find research documents showing that Nginx is better qua performance.

And how did you configure PHP7 on Apache and NGINX?

I did, and I don’t find the evidence convincing. Most tests end up being more about mod_php vs PHP-FPM, than Apache vs NGINX and when you use PHP-FPM on both, then the difference isn’t that great. Add NGINX as a reverse proxy and the difference is gone.

I do agree though that people should be given a choice. Meaning that there should be an htaccess equivalent, written by the community’s NGINX experts. It should be easier now that NGINX has grown and has added some Apache equivalent features.

I also dint understand rhe question. Nginx is straight forward and documented.
Runs perfect with PHP7 on the Raspi2

Hi,

Instead of packaging a web server included with the download of NextCloud, I think it is rather better to create a Sub-project L(A)MPP - webserver, php, mysql, webserver, nextcloud, etc.

regards, hitam4450

You’re confusing the NC package with the one provided by your distro. Only install an AMP or NMP stack via distro packages and install Nextcloud the normal way, by creating a vhost and putting the files from the NC package in the root folder for that vhost.

We are running oC on Nginx 1.11 with PHP7.0-FPM, Wildcard SSL, on Postgresql just fine. I will give that it took a lot of tuning to get everything right and with the new changes in oC for .htaccess and .user.ini in 9.0.2, I ran into even more issues based on permissions.

Upgrades to PHP7.0 brought in errors that needed configuration changes and then the Nginx upgrade to HTTP2 from SPDY brought us down for half a day. So for a normal user it can be difficult. Having a Package with Nginx that just works out of the box would be nice. Especially with the upcoming release of Nginx that with support dynamic loading of modules, something brought from the Tengine fork of Nginx.

The setup and use of the front_controller active code is not easy for the new user. There is an excellent updated NGINX config in the forum, but it is not posted to the OC documentation.

I am going to try it this weekend and see if the changes are implemented for “pretty URLs”.

He is right that an own cloud-nginx would be nice to have on Ubuntu.

Something to ask the Ubuntu package maintainers

Then it would be nice if someone somewhere could setup a nextcloud-nginx PPA for the users that are less technically inclined.

As a start I a proper documentation of the nginx installation process will be noce. I tried to follow the multiple guidelines on the owncloud documentation and in the internet to install the owncloud on nginx, but I couldn’t make it work as the information is scattered all over the place.

https://www.pestmeester.nl/ did a great one I used for owncloud as well as nextcloud.

Interesting guide!

But it contains quite some wrong settings (e.g. /.well-known rewrites) regarding the nginx-configuration for owncloud in a subdir. Also it doesn’t contain any front-controller settings. Therefore I would strongly recommend to use one of the nginx-configurations from here: https://docs.nextcloud.org/server/9/admin_manual/installation/nginx_owncloud_9x.html#nginx-configuration-for-the-nextcloud-9-x-branches

2 Likes

Please have a look at
nginx, ssl, owncloud/nextcloud
Having regards to nginx and ownCloud it is a higly recommended (german) documentation.
Chers, Carsten

1 Like

Nice manual.
The first I saw with the destinction between root- and subfolder-installations

Nice manual. Thx.

I have OC 8 running on nginx. The only differences I’ve recognized are some steps to deal with some errors/warnings in the admin section, e.g.: The “Strict-Transport-Security” HTTP header is not configured to least “15768000” seconds. For enhanced security we recommend enabling HSTS as described in our security tips.

would also like to see documentation for running it on a directadmin (or cpanel) server with nginx.
for example I run my own dedicated server for a few domains and have directadmin installed to make it easier to admin the domains.
I have to run httpd (apache) as I cannot find a way to make any location block rules work for owncloud/nextcloud.

This question is still hot imho.

Perfs

conitnue here: https://help.dreamhost.com/hc/en-us/articles/215945987-Web-server-performance-comparison

Trend

Nginx is the leading web servers supporting some the the more modern protocols, which is probably one of the reasons why people start using it. 76.8% of all sites supporting HTTP/2 use Nginx, while only 2.3% of those sites rely on Apache.

This is not really surprising, considering that the HTTP/2 module of Apache is still classified as “experimental”. Similarly, 63.3% of all sites that support IPv6 run on Nginx, almost three times as much as Apache.

continue here : Nginx reaches 33.3% web server market share while Apache falls below 50%

So please, consider to officialy support a nginx distro.

2 Likes