Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Nginx is widely used and recommended by many Drupallers. There is sufficient documentation available on d.o for it. Let's add it to INSTALL.txt
Comment | File | Size | Author |
---|---|---|---|
#24 | 1839336-INSTALL.txt-Nginx.patch | 530 bytes | likewhoa |
#18 | 18-1839336-INSTALL.txt-Nginx.patch | 568 bytes | mitchell |
#15 | NGINX_support-1839336.patch | 570 bytes | likewhoa |
#13 | 13-1839336-INSTALL.txt-Nginx.patch | 570 bytes | mitchell |
#11 | INSTALL.txt-webserver.txt | 570 bytes | mitchell |
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedNo discussion here. Nginx is already in the list of recommended web servers on the Drupal requirements page.
Comment #2
RobLoachQuick note that it also works just fine with PHP 5.4's build-in web server.
Comment #3
webchickCommitted and pushed to 8.x. Thanks! Seems like we could mark this for 7.x backport as well. Didn't apply cleanly for whatever reason.
Comment #4
mitchell CreditAttribution: mitchell commentedThanks webchick. Here's a D7 patch and, out of curiosity, a diff between the D8 and D7 patches.
Comment #5
jhodgdonI personally would not have committed the 8.x patch, since we don't normally use "&" in documentation. But if webchick wants to commit the 7.x patch as well I will not stand in the way.
Comment #6
webchickOops. That'll learn me for committing documentation patches. :D
Comment #7
jhodgdonIn that case. :)
Comment #8
likewhoa CreditAttribution: likewhoa commentedAdded two patches, one that changes the sentence on httpd server recommendations and another with removal of (or greater) replaced with >=version. I think the second patch simplifies the meaning of required versions for most users but this could possibly confuse novices users.
Comment #9
jhodgdonPlease don't attach D7 patches to a D8 issue -- read:
http://drupal.org/node/1319154#multiple-versions
So... I'm not happy with this wording:
"We recommend Apache 2.0 (or greater) or Nginx 1.1 (or greater), but just about any webserver that supports PHP will do."
Who is this "we"? and what does "just about any webserver" mean? I don't think Drupal really runs all that well/easily on IIS for instance. Stick to our actual recommendations please.
Regarding the "extended" patch, I think the existing wording is clearer (not everyone reading this document is a programmer), and you have also made it inconsistent between sections of the requirements list....
So what we really just need is a patch for Drupal 8 to change & to "and" or maybe the sentence should be Either... or.
Comment #10
likewhoa CreditAttribution: likewhoa commentedkeeping it simple.
Comment #11
mitchell CreditAttribution: mitchell commentedOne other option is to use the same pattern as the databases section.
Comment #12
jhodgdonRE #11 - I like the "same pattern as" idea. Less thinking required to scan. :)
Just needs ":" after the first line (before the list), and please upload with extension "patch". Thanks!
Comment #13
mitchell CreditAttribution: mitchell commentedThanks jhodgdon.
Comment #15
likewhoa CreditAttribution: likewhoa commentedreroll
Comment #16
jhodgdonOK... I almost love this patch, but... it would say:
"Drupal requires... one of the following recommended web servers".
I could read that as saying "Drupal requires you to use one of these two recommended web servers", which is not strictly accurate -- you can get Drupal to work on other web servers.
The previous wording was essentially:
"Drupal requires... A web server. A and B are recommended"
which I think gets the correct point across better: You need a web server, and we recommend these two.
So can we fix up the wording one more time so that it can't be misinterpreted? Thanks!
Comment #17
likewhoa CreditAttribution: likewhoa commentedHow about one of these to choose from...
Who would have know this was going to be such a PITA.
Comment #18
mitchell CreditAttribution: mitchell commentedI think ~
any web server that supports PHP should work
captures the requirement well.I don't think 'recommended' is a necessary term.
I think multiple lines is a good idea, in case we want to add more known/recommended webservers later.
Patch attached.
--
Note: #10 still fits #9 and #16.
Comment #19
jhodgdonI'm OK with the patch here. We don't need to be wordy... Any other opinions? I am not entirely sure "a web server that supports PHP" really captures the essence of what Drupal needs completely, but it's probably good enough.
Comment #20
likewhoa CreditAttribution: likewhoa commented@jhodgdon "a web server that supports PHP" is enough because we don't need to get into the "...that supports PHP,Mysql,MariaDB,PosgreSQL,MongoDB etc.." I have personally tested Drupal on Apache,Lighttpd & Nginx and several others. In the end, end users are responsible for setting it up on whatever httpd they desire as long as it supports PHP. The recommended httpd servers are ideal and most novice Drupallers already know about the benefits of Apache or Nginx (Engine X).
Comment #21
jhodgdonOK then, it sounds like #18 is good to go, thanks! I'll leave it RTBC for a day or two to see if there are any other thoughts, and then get it committed.
Comment #22
jhodgdon#18 is committed to 8.x. Now back to 7.x. Thanks!
Comment #23
jhodgdonComment #24
likewhoa CreditAttribution: likewhoa commentedDrupal 7.x patch
Comment #25
RobLoachComment #26
David_Rothstein CreditAttribution: David_Rothstein commentedI'm confused here. We've historically "recommended" only Apache over the others, both here and on drupal.org. The drupal.org documentation was only updated to recommend Nginx the exact same day the patch here was committed: http://drupal.org/node/1783056/revisions/view/2435936/2444296
So what's the actual rationale?
It's my understanding that clean URLs and other features require extra work (and probably extra access to the server?) to set up on Nginx. Whereas for Apache we ship with .htaccess. And even for IIS, we ship with web.config.
Comment #27
jhodgdonDavid: The Nginx folks have been pushing for "recommended" status for Nginix for quite some time, and they do provide documentation on how to set it up. That's been in place for some time now. Also, Nginx had already been listed on the main Requirements page for longer (since September). It was only the Web Servers sub-page that got updated on the day of the patch.
I personally have no experience with Nginx so I can't comment on whether we should be recommending it or not, but it has been requested for quite some time. Search either this issue queue or the Documentation project queue for Nginx and I'm sure you'll find several issues.
Comment #28
David_Rothstein CreditAttribution: David_Rothstein commentedNginx is supported, but so is IIS (which is mentioned on that page too). That's not the same as recommended, though.
I looked through the issue queue and all I saw was #1226710: Add Nginx to web server system requirements which closed a while ago. So this issue seems to be the only one talking about "elevating" Nginx over IIS, so to speak.
I'm not saying we should promote IIS particularly (it's not even open source), but to have Nginx recommended on an equal level with Apache... are we sure we're ready to do that?
Comment #29
jhodgdonWell, I didn't commit the first patch (I only committed the correction for reformatting), so I will bow out of this argument now. I have no opinion about recommending particular servers, versions, etc. and know nothing about Nginx... I am also unsubscribing and will let David decide on whether to commit the patch for d7 since it is obviously not just a documentation issue. :)
Comment #30
David_Rothstein CreditAttribution: David_Rothstein commentedI rolled back http://drupal.org/node/1783056/revisions/view/2435936/2444296 for now, since it didn't seem to have any discussion.
I think the question is how likely someone can drop Drupal onto a server with Nginx and have it work well, without server level access. For Apache, this is fairly likely, given that we ship with .htaccess, and the required configuration to respect that (and mod_rewrite) is pretty common. For Nginx, I'm less familiar (although have used it) but I think http://drupal.org/node/976392 is likely to require more work on the part of the person installing Drupal.
Depending on the answer to that, we could also move towards something where Apache is "recommended" and Nginx is something like "recommended also, but only for more advanced users"?
Comment #31
mitchell CreditAttribution: mitchell commentedThese are no longer correct statements. Drupal requires a web server with PHP support. IMHO, the issue in #28, clearly demonstrates that, in this context, it is equally ambiguous to say that "Drupal supports a webserver" and "Drupal recommends a webserver'.
This issue only relates to INSTALL.txt. IMHO, 'recommending' a webserver doesn't need an issue. I only changed it because it was simply my interpretation of the community's view that people, in fact, are recommending it. If you want to undo and/or review this change in another issue, that's all possible.
That's not something that is decidable, IMHO. Here, we are, primarily, stating more clearly on which webservers Drupal will work. There is no distinction of 'recommended more than' or 'recommended equally to'. People simply are not recommending IIS.
At this point, since Nginx is widely used, our goal should be compiling good documentation for the current and potential users.
----
Setting #24 to RTBC per #25.
Comment #32
webchickI actually agree with David here, and sorry for being a bit hasty in commit here. "Recommended" has wildly different semantics than "Supported." It implies that Drupal works naturally, without any headaches, that it's well supported by contributed modules and community members, etc. Is that actually the case?
Comment #33
mitchell CreditAttribution: mitchell commentedI think the biggest question people have are about whether or not the installation docs are good enough. I spent some time trying to improve them recently, but I think they could still be a lot better organized. The Nginx docs could include more info which is referenced externally. #1783110: Clean up PHP requirements documentation page is still a big problem, imo.
Comment #34
likewhoa CreditAttribution: likewhoa commentedThe big issue that the core developers are stating is that Apache works out the box,since all it requires is an .htaccess which Drupal ships with, on the other hand Nginx doesn't support .htaccess but does have rewrite functionality but requires systems administration a.k.a root access to /etc/nginx in order to make clean urls work with Drupal.
The major web hosting providers support NGINX but that doesn't mean they have the required configuration which allows clean urls with a Drupal based install. I would assume most don't have this setup so with that being said, I would just let users know that they need to check with their hosting provider if they support "Drupal with NGINX".
This doesn't really help the case of having NGINX as a recommended web server but if you think about it, most people that venture into NGINX are not your average joe and most of them will have root/sudo access.
If NGINX doesn't make it into the recommended section then so be it, but don't revert back to the way things was were it shows Apache as the only recommended web server. NGINX is powerful, secure and fast and it's being used by some of the biggest websites on earth.
Comment #35
mitchell CreditAttribution: mitchell commentedI should have created an issue about the Webserver Requirements separate from this one. Oops.
#31 & #32: I changed the title back, but I think that's going to make this issue harder to follow:
INSTALL.txt
, which is only in 8.xThe two issues are not dependent on one another. The
INSTALL.txt
only has requirements, and I think it makes sense on its own. The (recommended)-ness will now be discussed, I guess..---
Re (recommended):
The way I look at this is that people are already recommending Nginx, the question is how good are our docs once people sit down to do it? With that in mind, I:
In my experiences, they both require the same amount of work out of the box: configuring the vhost for clean urls.
Most managed hosting providers take away the need for users to ever think about the webserver, the database server, the operating system, etc. Installation is completely automated through a control panel.
Comment #36
David_Rothstein CreditAttribution: David_Rothstein commentedHow about just throwing down the gauntlet and being bold, something like:
I'm sure it's not 100% true, but maybe close enough for a recommendation?
I added IIS because I think if we start listing them in INSTALL.txt we should make the list consistent with the docs page. (Before this issue, they were consistent and both listed Apache as the "recommendation". That's why I think the docs page and INSTALL.txt are related.)
Comment #37
likewhoa CreditAttribution: likewhoa commented@David_Rothstein lets get rid of this recommended wording and just keep #24 as it stands since it only just list the two most popular used web servers on production sites for Drupal. We can include the rest like IIS etc on the official documentation pages in more detail.
Most people will get the point that Apache is recommended since it's the most popular web server around and those that don't know about NGINX will at least know it can run on Drupal.
Comment #38
jhodgdonThis was already done on another issue.
Comment #39
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedThis was the issue :)
It still feels to me like we have a bit of a discrepancy between INSTALL.txt and the drupal.org documentation, but it's also been a while and at least we link to the documentation from INSTALL.txt. Putting this up for review for Drupal 7 for now.
Comment #40
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedPatch in #24 does still apply, by the way.
Comment #41
jhodgdonOK, the patch in #24 looks fine to me for D7. About what we have in D8.
Comment #42
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedWell, I am OK with this change (and by listing Apache first but not officially recommending it, it's actually kind of the same thing we do for MySQL in the database section).
However, it is not clear to me what version we should be recommending.
#24 says this:
But https://www.drupal.org/requirements/webserver currently says this:
Not only are those different; the second even leaves out the 1.1 branch entirely.
So I'm not sure what version we actually should be putting here. Anyone have any ideas?
Comment #43
likewhoa CreditAttribution: likewhoa commentedWe according to http://nginx.org/en/download.html perhaps we should put "1.8.1 (or greater)" but so that anyone that might only have access to an old outdated version then supporting >=1.0 should be fine.
Comment #44
jhodgdonIt appears that we should move this back to 8.0.x and also fix the INSTALL.txt there with a better recommendeation for Nginx, because it also currently says:
If someone can find the issue where this file was previously updated on 8.x, that might be helpful too, so we could comment on that issue and point people here for more discussion, and/or see what the logic was there.
Comment #45
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedgit log -S Nginx core/INSTALL.txt
still says this issue is the one that updated it. Here's the commit:I'm unhiding the patch also, since I got confused when I couldn't find it here :)
However I don't see any discussion above about why Nginx 1.1 was chosen.
Comment #46
likewhoa CreditAttribution: likewhoa commented@David_Rothstein at the time of the patch nginx 1.1 was available. nginx 1.1.0 was released on 2011-08-01 but since then it was probably removed from mirrors at the time of the patch. nginx 1.2.5 became stable so I can see why 1.1.x was recommended.
Comment #59
quietone CreditAttribution: quietone as a volunteer commentedThis was fixed in #2371587: Review install.txt for Drupal 8+. Moving to Drupal 7 queue where this applicable.
Comment #60
quietone CreditAttribution: quietone as a volunteer commentedAdding tag