Comments (4)
Hello @Soul6in6Gun and @kennyparsons, these are a very good points!
I hear two things from this discussion:
Point 1: is the way available and enabled sites are managed is different. In your example it uses the well-known separation of two different directories which is also known from the Apache web server. This is because I currently only support the nginx type structure. I could implement both logics and have them controlled by an environment variable/or other parameter.
Point 2: is the use of subdirectories for the organization of pages etc. This is another problem I can solve by adjusting the way such files are looked at. Should both be feasible and will be worked out by me in the next release.
Have I understood your requirements correctly?
Best David
from nginx-ui.
I think so.
from nginx-ui.
Adding to this: I dont use the sites-available/sites-enabled
logic, but rather simple folders of the different .conf
files. The folders are almost like categories: php sites, static web servers, proxy sites, etc. So it seems there needs to be some logic built in.
As a proposed solution: nginx itself already has this logic when it builds the configuration. The output of nginx -T
will show every site enabled to be served up with the path to the configuration file. Here's a snippet of mine:
# configuration file /etc/nginx/conf.d/php/files.techup.dev.conf:
server {
listen 80;
#items omitted
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}
As you can see here, by parsing the output of nginx -T
, we can very easily get the absolute path of every config file used. The great part is that it would be user agnostic. @Soul6in6Gun and I have different methods to organize our .conf
files, but parsing the nginx compiled configuration would work for both of us, without modification.
from nginx-ui.
Yeah, this thing could be parsed from configs itself. Although even simple manual option "check this path for webhost config" is enough for many cases imo - this covers up our requests.
from nginx-ui.
Related Issues (20)
- Possible arbitrary file access though Path Traversal vulnerability in some situations HOT 3
- Getting error when trying to run HOT 3
- Support openresty HOT 1
- [Suggestion] Implement nginxconfig.io HOT 2
- flask auth? HOT 4
- Getting an error on a fresh install HOT 2
- My nginx is installed with docker,when I run this app,I got a ERROR HOT 1
- Mobile support? HOT 1
- Reload nginx when domain status is set to enabled HOT 2
- Can code be merged to implement nginx operation management? HOT 2
- traefik integration with prefixpath /YOUR_PREFIX_PATH/nginx-ui
- Enhancement Request: .conf file verification button
- Generated domain conf template is invalid - missing server HOT 1
- Is there a binary release available? I need to integrate it with
- Docker security HOT 1
- Support for arm64? HOT 1
- Is this maintained?
- Support Running Behind Reverse Proxy ? http://xxx.xxx.xxx.xxx/nginx-ui ? HOT 2
- 全新安装报错 open /etc/nginx-ui/app.ini: no such file or directory
- Software design has flaws. Why do I have to provide the /etc/nginx/ directory to this program?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-ui.