Can't start nginx on port 8080

Hello,

I cant start nginx while running apache2 at the same time on my vpn’s IP 10.8.0.1 on the same server.

Here’s my nginx log:

  • nginx.service - nginx - high performance web server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2022-04-02 18:19:14 UTC; 7s ago
    Docs: nginx documentation
    Process: 4317 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)

Apr 02 18:19:12 116a6f09-176b-4112-a307-6610da55070c systemd[1]: Starting nginx - high performance web server…
Apr 02 18:19:12 116a6f09-176b-4112-a307-6610da55070c nginx[4317]: nginx: [emerg] bind() to 10.8.0.1:8080 failed (98: Address already in use)
Apr 02 18:19:12 116a6f09-176b-4112-a307-6610da55070c nginx[4317]: nginx: [emerg] bind() to 10.8.0.1:8080 failed (98: Address already in use)
Apr 02 18:19:13 116a6f09-176b-4112-a307-6610da55070c nginx[4317]: nginx: [emerg] bind() to 10.8.0.1:8080 failed (98: Address already in use)
Apr 02 18:19:13 116a6f09-176b-4112-a307-6610da55070c nginx[4317]: nginx: [emerg] bind() to 10.8.0.1:8080 failed (98: Address already in use)
Apr 02 18:19:14 116a6f09-176b-4112-a307-6610da55070c nginx[4317]: nginx: [emerg] bind() to 10.8.0.1:8080 failed (98: Address already in use)
Apr 02 18:19:14 116a6f09-176b-4112-a307-6610da55070c nginx[4317]: nginx: [emerg] still could not bind()
Apr 02 18:19:14 116a6f09-176b-4112-a307-6610da55070c systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Apr 02 18:19:14 116a6f09-176b-4112-a307-6610da55070c systemd[1]: nginx.service: Failed with result ‘exit-code’.
Apr 02 18:19:14 116a6f09-176b-4112-a307-6610da55070c systemd[1]: Failed to start nginx - high performance web server.

Could anyone help me?

Thanks

You got Apache2 running on the same port so you can’t start Nginx
Use a different port

I didn’t change anything on my installation. So my apache2 configs are on port 8080 and my nginx configs are on port 80

Check your config then… By default Nginx should never bind to 8080…

Where should I check it?

Okay. I changed the WEB_PORT Variable in /usr/local/hestia/conf/hestia.conf to something different and have done a rebuild of the domains with:

for user in $(v-list-sys-users plain); do v-rebuild-web-domains $user; done

Now it’s solved for me, thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.