• Установка двух сервисов netbox и phpipam на один nginx ubuntu 22.04, как сделать?

    @iwnch Автор вопроса
    ликную вот такой командой
    sudo ln -s /etc/nginx/sites-available/phpipam.conf /etc/nginx/sites-enabled/
    Написано
  • Установка двух сервисов netbox и phpipam на один nginx ubuntu 22.04, как сделать?

    @iwnch Автор вопроса
    После того как линкую его в sites-enabled и перезапускаю nginx, он в ошибку падает, в логах вот такое
    Job for nginx.service failed because the control process exited with error code.
    See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.

    в journalctl -xeu nginx.service такая ошибка
    июл 31 10:41:00 test-zabbix systemd[1]: nginx.service: Failed with result 'exit-code'.
    ░░ Subject: Unit failed
    ░░ Defined-By: systemd
    ░░ Support: http://www.ubuntu.com/support
    ░░ 
    ░░ The unit nginx.service has entered the 'failed' state with result 'exit-code'.
    июл 31 10:41:00 test-zabbix systemd[1]: Failed to start A high performance web server and a reverse proxy server.
    ░░ Subject: Ошибка юнита nginx.service
    ░░ Defined-By: systemd
    ░░ Support: http://www.ubuntu.com/support
    ░░ 
    ░░ Произошел сбой юнита nginx.service.
    ░░ 
    ░░ Результат: failed.
    июл 31 10:44:00 test-zabbix systemd[1]: Starting A high performance web server and a reverse proxy server...
    ░░ Subject: Начинается запуск юнита nginx.service
    ░░ Defined-By: systemd
    ░░ Support: http://www.ubuntu.com/support
    ░░ 
    ░░ Начат процесс запуска юнита nginx.service.
    июл 31 10:44:00 test-zabbix nginx[20412]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
    июл 31 10:44:00 test-zabbix nginx[20412]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
    июл 31 10:44:01 test-zabbix nginx[20412]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
    июл 31 10:44:01 test-zabbix nginx[20412]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
    июл 31 10:44:02 test-zabbix nginx[20412]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
    июл 31 10:44:02 test-zabbix nginx[20412]: nginx: [emerg] still could not bind()
    июл 31 10:44:02 test-zabbix systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
    ░░ Subject: Unit process exited
    ░░ Defined-By: systemd
    ░░ Support: http://www.ubuntu.com/support
    ░░ 
    ░░ An ExecStart= process belonging to unit nginx.service has exited.
    ░░ 
    ░░ The process' exit code is 'exited' and its exit status is 1.
    июл 31 10:44:02 test-zabbix systemd[1]: nginx.service: Failed with result 'exit-code'.
    ░░ Subject: Unit failed
    ░░ Defined-By: systemd
    ░░ Support: http://www.ubuntu.com/support
    ░░ 
    ░░ The unit nginx.service has entered the 'failed' state with result 'exit-code'.
    июл 31 10:44:02 test-zabbix systemd[1]: Failed to start A high performance web server and a reverse proxy server.
    ░░ Subject: Ошибка юнита nginx.service
    ░░ Defined-By: systemd
    ░░ Support: http://www.ubuntu.com/support
    ░░ 
    ░░ Произошел сбой юнита nginx.service.
    ░░ 
    ░░ Результат: failed.
    Написано
  • Установка двух сервисов netbox и phpipam на один nginx ubuntu 22.04, как сделать?

    @iwnch Автор вопроса
    Вот мой кфг nginx для netbox
    server {
        listen [::]:443 ssl ipv6only=off;
    
        # CHANGE THIS TO YOUR SERVER'S NAME
        server_name my_domain_name;
            
        ssl_certificate /etc/ssl/cert.crt.pem;
        ssl_certificate_key /etc/ssl/cert.key.pem;
            access_log      /var/log/nginx/netbox.access.log;
        error_log       /var/log/nginx/netbox.error.log;
        client_max_body_size 25m;
    
        location /static/ {
            alias /opt/netbox/netbox/static/;
        }
    
        location / {
            # Remove these lines if using uWSGI instead of Gunicorn
            proxy_pass http://127.0.0.1:8001;
            proxy_set_header X-Forwarded-Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-Proto $scheme;
    
            # Uncomment these lines if using uWSGI instead of Gunicorn
            # include uwsgi_params;
            # uwsgi_pass  127.0.0.1:8001;
            # uwsgi_param Host $host;
            # uwsgi_param X-Real-IP $remote_addr;
            # uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
            # uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;
    
        }
    }
    
    server {
        #Redirect HTTP traffic to HTTPS
        listen [::]:80 ipv6only=off;
        server_name _;
        return 301 https://$host$request_uri;
    }
    Написано
  • Установка двух сервисов netbox и phpipam на один nginx ubuntu 22.04, как сделать?

    @iwnch Автор вопроса
    Привет!
    server {
        listen       80;
        # root directory
        server_name my_domain_name;
        index        index.php;
        root   /var/www/html/phpipam;
    
    
        location / {
                try_files $uri $uri/ /index.php$is_args$args;
            }
    
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                 fastcgi_pass   unix:/run/php/php-fpm.sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_index index.php;
                include fastcgi_params;
            }
    
     }

    Сейчас это мой кфг nginx для phpipam, лежит по пути /etc/nginx/site-available/phpipam
    Написано