[PR #16035] [MERGED] Fixes #16032: Specify the WSGI module to load in uwsgi.ini #14757

Closed
opened 2025-12-29 23:26:34 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/16035
Author: @markkuleinio
Created: 5/8/2024
Status: Merged
Merged: 5/8/2024
Merged by: @jeremystretch

Base: developHead: 16032-uwsgi-file


📝 Commits (1)

  • 7d1faf4 Fixes #16032: Specify the WSGI module to load in uwsgi.ini

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 contrib/uwsgi.ini (+6 -0)

📄 Description

Fixes: #16032

chdir is needed for Python paths to work (see https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/uwsgi/). I used the relative path netbox because the NetBox-default systemd configuration file has WorkingDirectory=/opt/netbox, thus concentrating the possible NetBox install path customizations in the systemd configuration file.

I used the short module = netbox.wsgi syntax to specify the WSGI application to load. https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html#deploying-django hints using wsgi-file = netbox/wsgi.py, but I figured maybe leaving any "netbox/xxx" path-looking strings out would help to avoid breaking this configuration accidentally, if someone tries to customize the NetBox installation path.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/16035 **Author:** [@markkuleinio](https://github.com/markkuleinio) **Created:** 5/8/2024 **Status:** ✅ Merged **Merged:** 5/8/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `16032-uwsgi-file` --- ### 📝 Commits (1) - [`7d1faf4`](https://github.com/netbox-community/netbox/commit/7d1faf47f3983d94a2c1c07e9f4bb7eb9b05ff4d) Fixes #16032: Specify the WSGI module to load in uwsgi.ini ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `contrib/uwsgi.ini` (+6 -0) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #16032 `chdir` is needed for Python paths to work (see https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/uwsgi/). I used the relative path `netbox` because the NetBox-default systemd configuration file has `WorkingDirectory=/opt/netbox`, thus concentrating the possible NetBox install path customizations in the systemd configuration file. I used the short `module = netbox.wsgi` syntax to specify the WSGI application to load. https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html#deploying-django hints using `wsgi-file = netbox/wsgi.py`, but I figured maybe leaving any "netbox/xxx" path-looking strings out would help to avoid breaking this configuration accidentally, if someone tries to customize the NetBox installation path. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:26:34 +01:00
adam closed this issue 2025-12-29 23:26:34 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14757