• nginx or apache for php?

    From Walt E@21:1/5 to All on Thu Aug 1 13:40:01 2024
    Hello

    I have been using apache2 + php for years under debian.
    But I heard people says nginx + php has better performance.
    Do you have experience on both of setup and share a bit with me?

    Thank you.
    Walt Evans

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Walt E on Thu Aug 1 14:00:02 2024
    Hi,

    On Thu, Aug 01, 2024 at 07:35:38PM +0800, Walt E wrote:
    I have been using apache2 + php for years under debian.
    But I heard people says nginx + php has better performance.
    Do you have experience on both of setup and share a bit with me?

    I do and I don't think it will make any noticeable performance
    difference for you, so I would suggest sticking with apache2 unless
    you have a stronger need to use nginx or for purely educational
    purposes.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Ritter@21:1/5 to Walt E on Thu Aug 1 15:00:01 2024
    Walt E wrote:
    I have been using apache2 + php for years under debian.
    But I heard people says nginx + php has better performance.
    Do you have experience on both of setup and share a bit with me?


    I have experience on both.

    Do you have a performance problem? If not, don't change.

    If you do have a performance problem: how much have you
    optimized already? What methods have you used? Can you define
    the gap between what you have and what you need?

    How much is it worth to you in terms of time, and in terms of
    money?

    -dsr-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gene heskett@21:1/5 to Andy Smith on Thu Aug 1 15:00:01 2024
    On 8/1/24 07:50, Andy Smith wrote:
    Hi,

    On Thu, Aug 01, 2024 at 07:35:38PM +0800, Walt E wrote:
    I have been using apache2 + php for years under debian.
    But I heard people says nginx + php has better performance.
    Do you have experience on both of setup and share a bit with me?

    I do and I don't think it will make any noticeable performance
    difference for you, so I would suggest sticking with apache2 unless
    you have a stronger need to use nginx or for purely educational
    purposes.

    Thanks,
    Andy

    Au contraire Andy. The best, most expandable 3d printer driver, klipper,
    uses nginx to build its control interface, apache2 was probably tested
    and found wanting. Most of this stuff is run on stm32 for the hardware interface, administered by klipper running on one of the better pi
    clones. rpi3b's generally are minimum but I'm using several 64 bit
    bpi-m5's for that.

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to gene heskett on Thu Aug 1 15:40:01 2024
    Hello,

    On Thu, Aug 01, 2024 at 08:54:22AM -0400, gene heskett wrote:
    Au contraire Andy.

    What a surprise. Here we go again.

    The best, most expandable 3d printer driver, klipper,
    uses nginx to build its control interface

    It doesn't matter what niche activities you (or I) engage in on niche
    hardware that happen to use nginx for reasons you don't know of but
    assume are "probably" vital. OP has a working apache2 that they are
    familiar with. If they told me they had a working nginx they are
    familiar with I'd have told them to stick with that.

    I am answering based on OP's stated situation. You are answering
    based on your personal circumstances and still making a big leap of
    reasoning.

    apache2 was probably tested and found wanting.

    Fact that it's working for OP's use case trumps your vague
    "probably". If OP had come here with a problem we'd solve it, and
    that could involve switching to something else. But they didn't.

    Most of this stuff is run on stm32 for the hardware interface,
    administered by klipper running on one of the better pi clones.
    rpi3b's generally are minimum but I'm using several 64 bit
    bpi-m5's for that.

    It doesn't seem that OP is doing anything like that and if they were
    it would be down to them to state they have an issue with
    constrained resources. They did not, so your advice is bizarre at
    best.

    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alain D D Williams@21:1/5 to Dan Ritter on Thu Aug 1 16:00:03 2024
    On Thu, Aug 01, 2024 at 08:39:11AM -0400, Dan Ritter wrote:

    Do you have a performance problem? If not, don't change.

    More to the point - what does the application do, where does its time go ?
    Eg if you have complex database selects then the web server overhead prolly only takes a small part of total time -- so changing it will gain you little.

    You need to profile & understand first.

    If you do have a performance problem: how much have you
    optimized already? What methods have you used? Can you define
    the gap between what you have and what you need?

    --
    Alain Williams
    Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
    +44 (0) 787 668 0256 https://www.phcomp.co.uk/
    Parliament Hill Computers. Registration Information: https://www.phcomp.co.uk/Contact.html
    #include <std_disclaimer.h>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Alain D D Williams on Thu Aug 1 16:20:01 2024
    Hello,

    On Thu, Aug 01, 2024 at 02:57:51PM +0100, Alain D D Williams wrote:
    You need to profile & understand first.

    It really seems more like a case of Fear Of Missing Out - "some
    people said nginx is faster". 😀

    I'm all for a fun learning experience, but I don't think OP is
    particularly missing out otherwise.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sarunas Burdulis@21:1/5 to All on Thu Aug 1 16:40:01 2024
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------VG8YcCjUPXUGUf48zHmEjVwz
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    T24gOC8xLzI0IDA3OjM1LCBXYWx0IEUgd3JvdGU6DQo+IEhlbGxvDQo+IA0KPiBJIGhhdmUg YmVlbiB1c2luZyBhcGFjaGUyICsgcGhwIGZvciB5ZWFycyB1bmRlciBkZWJpYW4uIEJ1dCBJ IGhlYXJkDQo+IHBlb3BsZSBzYXlzIG5naW54ICsgcGhwIGhhcyBiZXR0ZXIgcGVyZm9ybWFu Y2UuDQoNClRoYXQgaXMgbm90IHRydWU6DQoNCjEuIGh0dHBzOi8vcGVvcGxlLmFwYWNoZS5v cmcvfmppbS9wcmVzb3MvQUNOQTExL0FwYWNoZV9odHRwZF9jbG91ZC5wZGYNCjIuIA0KaHR0 cHM6Ly93d3cuc2xpZGVzaGFyZS5uZXQvc2xpZGVzaG93L2Nob29zaW5nLWEtcHJveHktc2Vy dmVyLWFwYWNoZWNvbi0yMDE0LzMzNTA2MTY4DQoNCi0tIA0KU2FydW5hcyBCdXJkdWxpcw0K RGFydG1vdXRoIE1hdGhlbWF0aWNzDQptYXRoLmRhcnRtb3V0aC5lZHUvfnNhcnVuYXMNCg0K wrcgaHR0cHM6Ly91c2VwbGFpbnRleHQuZW1haWwgwrcNCg0K

    --------------VG8YcCjUPXUGUf48zHmEjVwz--

    -----BEGIN PGP SIGNATURE-----

    wsB5BAABCAAjFiEE5ODlqx+pLMu9Wq48Bw+NpurIYD0FAmarnEUFAwAAAAAACgkQBw+NpurIYD08 PQf+LdtkTLgdUJuatch119kTLwFAdDJWt0gN7JWSXhVSuiBFX+gVBsxHoLQZgb3LZd/l1jsSc3SV 9q9FVyzf+rrNZzytsZ6F+cEVZzXRwdtX0mllNxERQL9dCEct+uhfXJEOZXNh046lG4ucFbIyvrWJ oohj4JoO+MWhW9xvE2LSr6BSPbq24VVVv61c4ueFMmZPIg+yLi0/hE0VdAxq2VQ2o6D/ztHgOTLi 5Nzv4kZ3UoeVN9YsF0OcqOwswSmonKRe3PKJ2qhWJgIPiKmEEBmDAueBmWVFJurY0G5UK6XJ8yWK Ux5Lfy5qOgZASXQnWW4pgv5Mj2p+/GpvGET3F5oKJQ==
    =nbvu
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gene heskett@21:1/5 to Sarunas Burdulis on Thu Aug 1 19:30:01 2024
    On 8/1/24 10:31, Sarunas Burdulis wrote:
    On 8/1/24 07:35, Walt E wrote:
    Hello

    I have been using apache2 + php for years under debian. But I heard
    people says nginx + php has better performance.

    That is not true:

    1. https://people.apache.org/~jim/presos/ACNA11/Apache_httpd_cloud.pdf
    2. https://www.slideshare.net/slideshow/choosing-a-proxy-server-apachecon-2014/33506168

    While (2) purports to be all encompassing, I'll point out that the data
    is a decade stale. And needs redone using contemporary tooling.

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gene heskett@21:1/5 to Andy Smith on Thu Aug 1 19:20:01 2024
    On 8/1/24 09:34, Andy Smith wrote:
    Hello,

    On Thu, Aug 01, 2024 at 08:54:22AM -0400, gene heskett wrote:
    Au contraire Andy.

    What a surprise. Here we go again.

    The best, most expandable 3d printer driver, klipper,
    uses nginx to build its control interface

    It doesn't matter what niche activities you (or I) engage in on niche hardware that happen to use nginx for reasons you don't know of but
    assume are "probably" vital. OP has a working apache2 that they are
    familiar with. If they told me they had a working nginx they are
    familiar with I'd have told them to stick with that.

    I am answering based on OP's stated situation. You are answering
    based on your personal circumstances and still making a big leap of reasoning.

    apache2 was probably tested and found wanting.

    Fact that it's working for OP's use case trumps your vague
    "probably". If OP had come here with a problem we'd solve it, and
    that could involve switching to something else. But they didn't.

    Neither of us has any knowledge of how many coding hours went into
    making apach2 work for the OP, the OP didn't indicate.

    It doesn't seem that OP is doing anything like that and if they were
    it would be down to them to state they have an issue with
    constrained resources. They did not, so your advice is bizarre at
    best.

    It also illustrates that this stuff isn't restricted to "genuine rpi"
    stuff to run on, there are dozens of other clones that can do this quite nicely. Some of them quite a bit faster than the rpi's with their usb2
    speed limits. That is one of the reasons I chose the bpi-m5, all 4 usb
    ports are usb3.

    That spreading of "it works for me" info seems like a proper function of
    a "community" list, Andy.

    Andy


    Cheers, & best wishes, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew M.A. Cater@21:1/5 to gene heskett on Thu Aug 1 21:10:03 2024
    On Thu, Aug 01, 2024 at 01:10:37PM -0400, gene heskett wrote:
    On 8/1/24 09:34, Andy Smith wrote:
    Hello,

    On Thu, Aug 01, 2024 at 08:54:22AM -0400, gene heskett wrote:
    Au contraire Andy.

    What a surprise. Here we go again.

    The best, most expandable 3d printer driver, klipper,
    uses nginx to build its control interface

    I am answering based on OP's stated situation. You are answering
    based on your personal circumstances and still making a big leap of reasoning.

    apache2 was probably tested and found wanting.

    Fact that it's working for OP's use case trumps your vague
    "probably". If OP had come here with a problem we'd solve it, and
    that could involve switching to something else. But they didn't.

    Neither of us has any knowledge of how many coding hours went into making apach2 work for the OP, the OP didn't indicate.


    There's a to and fro here - none of us knows _exactly_ how much
    time and effort the original poster is able to devote to this.
    Both would do the job. I used nginx for my Debian mirror because
    it allegedly serves small files very well.

    It also illustrates that this stuff isn't restricted to "genuine rpi" stuff to run on, there are dozens of other clones that can do this quite nicely. Some of them quite a bit faster than the rpi's with their usb2 speed limits. That is one of the reasons I chose the bpi-m5, all 4 usb ports are usb3.

    That spreading of "it works for me" info seems like a proper function of a "community" list, Andy.


    "It works for me" : Gene, how many of your ARM boards are running
    Debian as distinct from Ubuntu / Armbian?

    You do keep repeating that everyone should follow you in running
    ARM boards and pushing stuff forwards yourself but this list always
    has problems establishing exactly where your problems lie and exactly
    what you've done.

    All the very best to all on the list,

    Andy
    (amacater@debian.org)

    Andy


    Cheers, & best wishes, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Walt E@21:1/5 to Jeffrey Walton on Thu Aug 1 22:10:02 2024
    Hello

    I am currently running a simple Wordpress service with low traffic, so I
    have not encountered any performance issues. Apache performs well. But I
    will still try nginx+php fpm as a substitute when I have time. As for
    reverse proxy, because I used CloudFlare, I think CloudFlare's web
    server plays the role of reverse proxy here. And as far as I know, CF
    also uses nginx.

    Thanks for all your help.



    On 2024-08-01 23:26, Jeffrey Walton wrote:
    On Thu, Aug 1, 2024 at 10:40 AM Walt E <walt@ik.me> wrote:

    I have been using apache2 + php for years under debian.
    But I heard people says nginx + php has better performance.
    Do you have experience on both of setup and share a bit with me?

    Related, Nginx is generally considered more secure than Apache. Nginx
    has approximately 220 CVEs, while Apache and friends has roughly 2700
    CVEs. Confer, <https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=apache>
    and <https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=nginx>.

    I think it was Jon Bentley who said, if it does not have to be
    correct, then I can make it as fast as you want it to be. Quickly
    arriving at an incorrect result is not a good outcome.

    Jeff

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gene heskett@21:1/5 to Andrew M.A. Cater on Fri Aug 2 02:20:01 2024
    On 8/1/24 15:01, Andrew M.A. Cater wrote:
    On Thu, Aug 01, 2024 at 01:10:37PM -0400, gene heskett wrote:
    On 8/1/24 09:34, Andy Smith wrote:
    Hello,

    On Thu, Aug 01, 2024 at 08:54:22AM -0400, gene heskett wrote:
    Au contraire Andy.

    What a surprise. Here we go again.

    The best, most expandable 3d printer driver, klipper,
    uses nginx to build its control interface

    I am answering based on OP's stated situation. You are answering
    based on your personal circumstances and still making a big leap of
    reasoning.

    apache2 was probably tested and found wanting.

    Fact that it's working for OP's use case trumps your vague
    "probably". If OP had come here with a problem we'd solve it, and
    that could involve switching to something else. But they didn't.

    Neither of us has any knowledge of how many coding hours went into making
    apach2 work for the OP, the OP didn't indicate.


    There's a to and fro here - none of us knows _exactly_ how much
    time and effort the original poster is able to devote to this.
    Both would do the job. I used nginx for my Debian mirror because
    it allegedly serves small files very well.

    It also illustrates that this stuff isn't restricted to "genuine rpi" stuff >> to run on, there are dozens of other clones that can do this quite nicely. >> Some of them quite a bit faster than the rpi's with their usb2 speed limits. >> That is one of the reasons I chose the bpi-m5, all 4 usb ports are usb3.

    That spreading of "it works for me" info seems like a proper function of a >> "community" list, Andy.


    "It works for me" : Gene, how many of your ARM boards are running
    Debian as distinct from Ubuntu / Armbian?

    Round about, all of them are running armbian, which, depending on the individual install, is either running debian bookworm for arm64, in the
    server version, or jammie in the full desktop installs. In either event,
    the actual dl I installed came from the armbian site. Either way, it
    just works on the arm64's.

    You do keep repeating that everyone should follow you in running
    ARM boards and pushing stuff forwards yourself but this list always
    has problems establishing exactly where your problems lie and exactly
    what you've done.

    Why should I try anymore? Everytime I try to describe what I've done, I
    get called a liar. That gets old rather quickly.

    What I will do, when trxie is released, is install it, but you will get
    to read absolutely everything I had to do to make it work.

    All the very best to all on the list,
    Ditto Andy.

    Andy
    (amacater@debian.org)

    Andy


    Cheers, & best wishes, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis


    .

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan Dowland@21:1/5 to Jeffrey Walton on Sun Aug 18 18:20:02 2024
    On Thu Aug 1, 2024 at 4:26 PM BST, Jeffrey Walton wrote:
    Related, Nginx is generally considered more secure than Apache. Nginx
    has approximately 220 CVEs, while Apache and friends has roughly 2700
    CVEs. Confer, <https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=apache>
    and <https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=nginx>.

    "Apache" is the name of a software foundation, that produces/looks after
    many pieces of software, including Apache httpd. A search for "apache",
    such as you have done, will turn up matches for all sorts of projects
    that are unrelated to the httpd. Indeed, the very first match on that
    URI is CVE-2024-5246, which applies to Apache Tomcat, not Apache httpd.

    --
    Please do not CC me for listmail.

    👱🏻 Jonathan Dowland
    jmtd@debian.org
    🔗 https://jmtd.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)