http://netbox.com
, хочу на эту же машину накатить и phpipam и сделать так же вход по доменному имени, перепробовал кучу гайдов, никак не пускает на страницу, возвращает постоянно bad request 400, в логах не пишет ничего, грешу на nginx, что что-то не так там написал. В линуксе новичок, может кто-то ставил его или сталкивался с такой проблемой, может скинете кфг 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;
}
}
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;
}
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.
июл 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.
bind() to [::]:80 failed
server {
listen 443 ssl ;
# CHANGE THIS TO YOUR SERVER'S NAME
server_name my_domain_name;
server {
#Redirect HTTP traffic to HTTPS
listen 80;
server_name _;
return 301 https://$host$request_uri;
}
sudo nginx -T
sudo netstat -tupln grep ':80'
listen 443 ssl;
listen 80;
192.168.42.161 - - [01/Aug/2024:10:07:12 +0000] "GET / HTTP/1.1" 400 154 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
192.168.42.161 - - [01/Aug/2024:10:07:12 +0000] "GET /favicon.ico HTTP/1.1" 400 154 "https://phpipam.corp.intranet.twiket.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
192.168.42.161 - - [01/Aug/2024:10:07:45 +0000] "GET / HTTP/1.1" 400 154 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
192.168.42.161 - - [01/Aug/2024:10:07:45 +0000] "GET /favicon.ico HTTP/1.1" 400 154 "https://phpipam.corp.intranet.twiket.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
192.168.42.161 - - [01/Aug/2024:10:07:46 +0000] "GET / HTTP/1.1" 400 154 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
192.168.42.161 - - [01/Aug/2024:10:07:46 +0000] "GET /favicon.ico HTTP/1.1" 400 154 "https://phpipam.corp.intranet.twiket.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
192.168.42.161 - - [01/Aug/2024:10:07:55 +0000] "GET / HTTP/1.1" 400 154 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
192.168.42.161 - - [01/Aug/2024:10:07:55 +0000] "GET /favicon.ico HTTP/1.1" 400 154 "https://phpipam.corp.intranet.twiket.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
192.168.42.161 - - [01/Aug/2024:10:07:56 +0000] "GET / HTTP/1.1" 400 154 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
192.168.42.161 - - [01/Aug/2024:10:07:56 +0000] "GET /favicon.ico HTTP/1.1" 400 154 "https://phpipam.corp.intranet.twiket.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"