# Nginx.http.sock נוצר מחדש עם קונטקסט שגוי

**URL:** <https://meta.discourse.org/t/nginx-http-sock-recreated-with-incorrect-selinux-context/202602>\
**Category:** Self-hosting\
**Created:** [4 בספטמבר,‏ 2021,‏ 10:55am UTC](https://meta.discourse.org/t/nginx-http-sock-recreated-with-incorrect-selinux-context/202602 "2021-09-04T10:55:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![uckelman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/uckelman/32/103854_2.png) [@uckelman](https://meta.discourse.org/u/uckelman)\
**Post date:** [4 בספטמבר,‏ 2021,‏ 11:09am UTC](https://meta.discourse.org/t/nginx-http-sock-recreated-with-incorrect-selinux-context/202602/3 "2021-09-04T11:09:21Z")

</div>

The thing a restart script wouldn’t catch is doing upgrades via the web from the admin panel—that’s what got me last time and prompted me to wonder if there were a fix for all cases.

I should also say: I don’t understand _why_ the socket doesn’t get the correct context on creation. SELinux clearly knows what the default context for the socket should be, as running `restorecon` shows. (Also, I can see the entry for the socket made from running `semanage fcontext` in `/etc/selinux/targeted/contexts/files/file_contexts.local`.)

---

_[View the full topic](https://meta.discourse.org/t/nginx-http-sock-recreated-with-incorrect-selinux-context/202602)._
