Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-04-10 15:07:01

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

RFC: official nginx support

Nginx now accounts for 33.3% of web server market share, and Apache httpd is declining.

It’s not beyond the realms of possibility that nginx usage will pass httpd usage in the next two or three years.

As I understand it, there’s an element of rewrite foo required to make the nginx equivalent of .htaccess, and not a huge amount more to do than that — but officially there’s no support on anything that’s not Apache httpd.

Can we talk about the practicalities of adding nginx support? What’s your 2c on this topic?

Offline

#2 2017-04-10 15:37:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: RFC: official nginx support

Yes, we should support it imo.

Fallout:

  • Setup checks for pre-requisites and initial setup of environment info.
  • RPC checks for its existence and calls getallheaders().
  • Diagnostics has lots of references/checks for Apache.
  • Language strings mention it by name.
  • A few constants reference Apache-specific values.
  • Lastmod / feeds have calculations that check for apache/gzip workarounds. No idea if this is still needed, but makss tweaked it recently, so presumably it’s still relevant.
  • As you say, we’d have to ship with a pair of rewrite files — .htaccess and .conf — and users would have to be savvy enough to choose which to change and upload to the server. Or, if it’s detectable and we have write access, we could rename them accordingly?
  • Documentation.

Nothing insurmountable. But the technical vagaries are currently beyond my area of expertise so we’d have to rely on Oleg / makss / Ruud or some other benevolent patch contributor to tool us up.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#3 2017-04-10 17:09:06

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: RFC: official nginx support

(“not a huge amount more to do” was a bit weasel-wordy in hindsight, I’m not implying this will all magically happen overnight)

Offline

#4 2017-04-10 19:09:24

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: RFC: official nginx support

I can deal with the language strings and documentation if it were to happen. About all I can offer though.

Offline

#5 2017-04-12 08:06:35

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: RFC: official nginx support

Please open an issue for this, deserves consideration.

Offline

#6 2017-04-12 08:30:01

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Offline

#7 2017-04-12 08:33:15

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: RFC: official nginx support

Bloke wrote #305292:

  • As you say, we’d have to ship with a pair of rewrite files — .htaccess and .conf — and users would have to be savvy enough to choose which to change and upload to the server. Or, if it’s detectable and we have write access, we could rename them accordingly?

When I last checked (and this was a couple of years ago) Apache ignores .conf files in the web server side, nginx ignores .htaccess files, so that might not be an issue.

Offline

#8 2017-04-12 15:50:26

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,091
Website Mastodon

Re: RFC: official nginx support

is there some big advantage of ngnix over Apache?


…. texted postive

Offline

#9 2017-04-12 18:43:10

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: RFC: official nginx support

bici wrote #305307:

is there some big advantage of ngnix over Apache?

In some cases, yes. Google is your friend

Offline

#10 2017-04-13 03:13:59

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,091
Website Mastodon

Re: RFC: official nginx support

well after reading the links i’m on the fence. i see no advantage of one over the other. but i like how someone explained to use both:

Using Apache and Nginx Together
After going over the benefits and limitations of both Apache and Nginx, you may have a better idea of which server is more suited to your needs. However, many users find that it is possible to leverage each server’s strengths by using them together.


…. texted postive

Offline

#11 2017-04-13 08:21:47

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: RFC: official nginx support

It’s a good idea to add nginx support, it’s not difficult to implement. A bit later I will prepare a patch.

BTW, I wanted to test nginx + HHVM , it works the same way as nginx + PHP-FPM.


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#12 2017-04-13 08:34:20

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: RFC: official nginx support

Great! Thanks makss

Offline

Board footer

Powered by FluxBB