Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
Re: RFC: official nginx support
Please open an issue for this, deserves consideration.
Offline
Re: RFC: official nginx support
Offline
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
Re: RFC: official nginx support
is there some big advantage of ngnix over Apache?
…. texted postive
Offline
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
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
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
Re: RFC: official nginx support
Great! Thanks makss
Offline