You need to check the logs from the restart point, otherwise its a guessing game. I mean the service is set to Start on reboot I guess. I don’t run nginx but it should say yes for that service
i rechecked and it shows this after reboot. It is enabled to run/start after boot but it is not running. where i can see the log?
a quick way to see the failure is to run
service nginx status
as root
something already appears to be running on port 443
run
ss -ltp ‘( dport = :443 or sport = :443 )’
to see what is using port 443, if anything and also look at the config file /etc/nginx/nginx.conf.
I have never used nginx as I have no issues with apache, but with apache you can define the listening port more than once, if you do that apache fails with a similar message
/etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
server_names_hash_bucket_size 128;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
Not getting any info related to the issue.
is the full error log, but I see no listen statements, they must be defined in
one of these locations have a look there for errors, really you need someone who uses nginx to trouble shoot this
checked and it seems like SSL is on port 443.
/etc/nginx/sites-available/site.name.conf
have listen myipaddresshere:443 ssl;
An old issue (that still seems to resurface) even the fix given here does not fully resolve it
I would be happy to give the access if devs want to look. Also there is the connection error on the dashboard in every few random minutes which is related with the theme is open.
Bind errors?
Is your DNS managed by Virtualmin or externally (all of mine are managed externally on the VM provider (eg Linode / Digital Ocean, etc) that difference might be relevant.
just installed nginx on ubuntu & virtualmin the domain.conf file looks different
maybe make the config the same as this for your domains and try to restart nginx
Hi, there is a WordPress install so i see some additional rules however the port 443 is still for SSL.
I would just remove the wordpress bits … there could be a syntax error in there … maybe
Ah, so not a minimal install - WP has been added.
so has a WP site been added (potentially with all of its plugins)
We now have a pile of PHP code - that means a few PHP checks should be made on the setup. like what PHP execution mode, version, is WP accessing a database?
Hi, i deleted the existing virtual servers/sites and it works without any virtual server when restarted. i see hostname working.
I created a new virtual server on a different domain and nginx webserver not start after reboot. it is blank default template.
I see the domain.name.conf file have the same extra codes.
Do you have any live production sites on the server? If not, I could check your server out and if needed, reinstall Virtualmin for you.
it is a test server. happy to share the details. however i am more looking to fix the issue.