# Config differences between 1.24 and 1.27

**URL:** <https://community.nginx.org/t/config-differences-between-1-24-and-1-27/253>\
**Category:** NGINX\
**Tags:** include, web-server, config\
**Created:** [February 6, 2025, 3:29pm UTC](https://community.nginx.org/t/config-differences-between-1-24-and-1-27/253 "2025-02-06T15:29:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev4openid](https://drob5swvtjqxg.cloudfront.net/user_avatar/community.nginx.org/dev4openid/32/219_2.png) [@dev4openid](https://community.nginx.org/u/dev4openid)\
**Post date:** [February 6, 2025, 3:29pm UTC](https://community.nginx.org/t/config-differences-between-1-24-and-1-27/253/1 "2025-02-06T15:29:27Z")

</div>

Hi Damian,

previously, I was on nginx 1.24, I see issues around security.  
Many of these issue have been addressed by 1.27.

So, I upgraded - now nothing works again.

Whereas before it used  
sever name definition:  
was in sites-available as default (which I removed) and [mysite.com](http://mysite.com) had server\_definition

html:  
the default html was in /var/www/html/ And the [mysite.com](http://mysite.com) was in the /var/www/mysite.com

and /etc/nginx/nginx.conf

I tried moving the html to the /usr/share/nginx/mysite.com  
AND  
server definition files to /etc/nginx/conf.d  
WHILE the /etc/nginx/nginx.conf file look different.

Q: where can I now find the configuration location so that 1.27 actually works? I am going backwards here. Quite frustrating.

Please advise. Maybe an example??

---

<div class="post-metadata">

**Author:** ![Damian\_Curry](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@Damian\_Curry](https://community.nginx.org/u/Damian_Curry)\
**Post date:** [February 6, 2025, 3:57pm UTC](https://community.nginx.org/t/config-differences-between-1-24-and-1-27/253/2 "2025-02-06T15:57:08Z")

</div>

It would probably be most helpful here to share your full configuration. if you run `nginx -V` it should print the full config that nginx has in memory. There shouldn’t have been any configuration changes that would break between those versions, but it sounds like it might have a change in the directory structure of where it expects configs to be(sites-enabled is a “legacy” setup, while conf.d is the current standard structure).

When it comes to where you store your site static content, you can define where nginx looks for that content in the config. Just need to make sure that nginx has permissions to access the files.

---

<div class="post-metadata">

**Author:** ![dev4openid](https://drob5swvtjqxg.cloudfront.net/user_avatar/community.nginx.org/dev4openid/32/219_2.png) [@dev4openid](https://community.nginx.org/u/dev4openid)\
**Post date:** [February 6, 2025, 9:12pm UTC](https://community.nginx.org/t/config-differences-between-1-24-and-1-27/253/3 "2025-02-06T21:12:31Z")

</div>

OK,  
so here it is:  
built by gcc 13.2.0 (Ubuntu 13.2.0-23ubuntu4)  
built with OpenSSL 3.0.13 30 Jan 2024  
TLS SNI support enabled  
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client\_temp --http-proxy-temp-path=/var/cache/nginx/proxy\_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi\_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi\_temp --http-scgi-temp-path=/var/cache/nginx/scgi\_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http\_addition\_module --with-http\_auth\_request\_module --with-http\_dav\_module --with-http\_flv\_module --with-http\_gunzip\_module --with-http\_gzip\_static\_module --with-http\_mp4\_module --with-http\_random\_index\_module --with-http\_realip\_module --with-http\_secure\_link\_module --with-http\_slice\_module --with-http\_ssl\_module --with-http\_stub\_status\_module --with-http\_sub\_module --with-http\_v2\_module --with-http\_v3\_module --with-mail --with-mail\_ssl\_module --with-stream --with-stream\_realip\_module --with-stream\_ssl\_module --with-stream\_ssl\_preread\_module --with-cc-opt=‘-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/data/builder/debuild/nginx-1.27.4/debian/debuild-base/nginx-1.27.4=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/data/builder/debuild/nginx-1.27.4/debian/debuild-base/nginx-1.27.4=/usr/src/nginx-1.27.4-1~noble -fPIC’ --with-ld-opt=‘-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -Wl,–as-needed -pie’

It is a new vps/site. The upgrade broke the certs and I can’t seem to fix it (Certbot fails).  
ping6 to google works so the network is alive.

Mostly because, as stated, the config is rather different to what it was for 1.24 (it was working then). My point is: it is OK to change the design but the change is design philosophy has an impact and folks (like me who are learners - need some pointers/docs to understand the rationale behind the changes) and therefore can figure out where to look/resolve. I know it sounds like whinging - and I truly am not - but it is very frustrating to folks not having a reference example to work from, if you see what I mean. It increases the barrier of adoption to newbies. I am a big fan of opensource/gpl and support it in my work.

Maybe it is the DNS - I can ping out not not in, the url does to resolve

---

<div class="post-metadata">

**Author:** ![dev4openid](https://drob5swvtjqxg.cloudfront.net/user_avatar/community.nginx.org/dev4openid/32/219_2.png) [@dev4openid](https://community.nginx.org/u/dev4openid)\
**Post date:** [February 7, 2025, 9:37am UTC](https://community.nginx.org/t/config-differences-between-1-24-and-1-27/253/4 "2025-02-07T09:37:24Z")

</div>

Hi Damian,

I noticed this is flagged as solved. I thought the protocol was that as originator of the issue am supposed to state it is solved/closed? (or in some cases the issue has had no further originator input for (say 2 days) the the issue is auto closed? This seems common practice, surely?

Setting that aside: You stated the web server redirection files are now positioned in config.d and the actual web files can be anywhere (as long as they can be accessed).  
In my case: I have positioned the web server redirection files in config.d. In the file I have called out the location of the web index file (I left it at the original location of /var/www/) so the

server {  
server\_name mysite.xxx www.mysite.xxx;  
root /var/www/mysite.xxx;  
index index.html;

location / {  
try\_files $uri $uri/ =404;  
}

as stated the html is stated at /var/www

When I run certbot:  
certbot install --cert-name mysite.xxx-0001  
Saving debug log to /var/log/letsencrypt/letsencrypt.log  
Deploying certificate  
Could not install certificate  
Could not automatically find a matching server block for mysite.xxx. Set the `server_name` directive to use the Nginx installer.

What server\_name it it referring to? It seems that the files above is not visible.

Note: mysite.xxx is an example site AND I am running in a VPS

---

<div class="post-metadata">

**Author:** ![dev4openid](https://drob5swvtjqxg.cloudfront.net/user_avatar/community.nginx.org/dev4openid/32/219_2.png) [@dev4openid](https://community.nginx.org/u/dev4openid)\
**Post date:** [February 10, 2025, 3:37pm UTC](https://community.nginx.org/t/config-differences-between-1-24-and-1-27/253/6 "2025-02-10T15:37:27Z")

</div>

@Damian_Curry  
After 3 days I have worked out the answer and it is simple.

In /etc/nginx/conf.d, the website config files for the site should have an extension of .conf - e.g. mysite.abs. **conf**

Once I changed that then the website was working and certbot could be applied. (NB rename/delte the default file)

However, there is a lack of consistency here!  
I suggest that the default file should be called default\*\*.conf\*\*. This is in order to ensure all the website (server) files have .config extensions.

I have been on many forums and posted this issue and have yet to receive a response - to avoid all newbie frustrations please consider the suggestion.

---

<div class="post-metadata">

**Author:** ![Damian\_Curry](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@Damian\_Curry](https://community.nginx.org/u/Damian_Curry)\
**Post date:** [February 10, 2025, 6:11pm UTC](https://community.nginx.org/t/config-differences-between-1-24-and-1-27/253/7 "2025-02-10T18:11:59Z")

</div>

Sorry for not responding earlier, but that would be the issue. What files are read from the conf.d directory is defined by the `include` statement in the nginx.conf. By default it is set to `include /etc/nginx/conf.d/*.conf`. This does seem to be something that we need to more clearly define in the documentation.

---

<div class="post-metadata">

**Author:** ![system](https://drob5swvtjqxg.cloudfront.net/user_avatar/community.nginx.org/system/32/19_2.png) [@system](https://community.nginx.org/u/system)\
**Post date:** [July 3, 2025, 10:29am UTC](https://community.nginx.org/t/config-differences-between-1-24-and-1-27/253/13 "2025-07-03T10:29:50Z")

</div>

Closed on July 3, 2025, 10:29am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
