schenkd / nginx-ui

Nginx UI allows you to access and modify the nginx configurations files without cli.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting an error on a fresh install

bkhanale opened this issue · comments

I'm getting following error after executing docker run -d --restart=always --name nginxui -v /etc/nginx:/etc/nginx -p 8080:8080 schenkd/nginx-ui:latest:

[2020-07-13 13:53:52,503] ERROR in app: Exception on /api/domains [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/api/endpoints.py", line 60, in get_domains
    for _ in os.listdir(config_path):
FileNotFoundError: [Errno 2] No such file or directory: '/etc/nginx/conf.d'

I obv do have nginx installed and that dir exists. I also tried changing the permissions but the problem persists. I feel like I'm making a dumb mistake here :P

commented

I'm getting following error after executing docker run -d --restart=always --name nginxui -v /etc/nginx:/etc/nginx -p 8080:8080 schenkd/nginx-ui:latest:

[2020-07-13 13:53:52,503] ERROR in app: Exception on /api/domains [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/api/endpoints.py", line 60, in get_domains
    for _ in os.listdir(config_path):
FileNotFoundError: [Errno 2] No such file or directory: '/etc/nginx/conf.d'

I obv do have nginx installed and that dir exists. I also tried changing the permissions but the problem persists. I feel like I'm making a dumb mistake here :P

you don't have a directory nginx/conf.d
what OS?

Sorry, I forgot about this issue. The problem was with the insufficient file permissions to that directory.

Doing a simple chmod fixed this issue.