General question: nginx config

Where are the nginx configuration files located? In my experience they’re usually in /etc/nginx but that doesn’t seem to be the case here, and I’m not quite sure how to figure it out otherwise.

My specific interest is in enabling users’ public_html for personal tilde websites, so I’d want the root domain config. If it matters, I have Mastodon occupying the root domain on my host.

Yes they are there. /etc/nginx/conf.d/ contains general config files, and (sub)domains directories (/etc/nginx/conf.d/domain.tld.d/) contain each apps configuration files.

And if we wanted to disable [or at least try to] FLoC, would we need to include
add_header Permissions-Policy interest-cohort=(); in every single configuration file? Or is there a way to do it once for all domains and subdomains?

Based on https://serverfault.com/a/859647, it seems it is better to add it in all configuration files. You can have it “globally” included at the server block level, but if for whatever reason an app adds its own headers then you would need to add this header too in its location block.

The cohort header stuff is already enabled in recent Yunohost versions : yunohost/security.conf.inc at dev · YunoHost/yunohost · GitHub

2 Likes

Ah so it’s already disabled for all domains and apps by default? :+1:
I’ve been putting editing all nginx confs by hand off for months and now I don’t regret it.

Yes indeed. more_set_headers behaves differently (and better in our case) than add_headers I quoted from Serverfault.

1 Like

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