Hello All,<br />
<br />
First time subscriber here, as I am new to using nginx. My question is about latency/performance issue as compared to our previously configured Apache server. Our web application is running on Apache + PHP-FPM, and we are planning on publishing a new site which contains only static files "published" from within the web application on a set interval. Thinking of saving the overhead of apache and php, I've setup nginx-light package on ubuntu and configured the server with minimal changes from default. Just to see what kind of improvement we have, I compared avg response times for the same static javascript file and noticed a difference, but the opposite of what I expected: ~128ms from apache and ~142ms from nginx. I've also tested with php enabled on nginx and seen about the same results.<br />
<br />
There must be something not right. I've looked at a lot performance tips, but no huge difference. The only minor help was switching to buffered logging, but the difference is probably close to the margin of error. Can anyone help?<br />
<br />
Here are some environment specs: (dedicated server)<br />
-Xeon 8-core cpu<br />
-16GB RAM<br />
-128gb SSD<br />
-Ubuntu 16.04.3<br />
-nginx-light package<br />
<br />
Here are the modifications to nginx.conf:<br />
http {<br />
    if_modified_since before;<br />
    ssl_session_cache shared:SSL:10m;<br />
    ssl_session_timeout 10m;<br />
}<br />
<br />
and under default site:<br />
server {<br />
    etag off;<br />
    ssl_certificate ...<br />
    ssl_certificate_key ...<br />
<br />
    location /static/ {<br />
        try_files $uri =404;<br />
        add_header Cache-Control "public";<br />
        expires 6M;<br />
        gzip on;<br />
        gzip_types *;<br />
    }<br />
}<br />
<br />
Any and all help is much appreciated!