Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

264
Views
apache2 not listening on port even though apache2ctl -S shows it should be

I have an apache2 server running on a Raspberry Pi with Buster, version 10. It forwards port 80 to port 443 for https connections. Works great. I am trying to add Nagios to this server. I have installed it and (obviously incorrectly) configured it. When I run:

jordan@megabyte:~ $ sudo apache2ctl -S

Here is my output:

VirtualHost configuration:
*:443                  mydomain.com (/etc/apache2/sites-enabled/default-ssl.conf:2)
*:8080                 megabyte.mydomain.com (/etc/apache2/sites-enabled/nagios4.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_USR_LIB_CGI_BIN
User: name="www-data" id=33
Group: name="www-data" id=33

To me, it looks like Nagios should be listening on port 8080 (as planned) but when I do

jordan@megabyte:~ $ nc -l -p 8080

It does not error out, suggesting that nothing is listening on port 8080. And:

jordan@megabyte:/etc/apache2 $ sudo netstat -nltp | grep 8080

returns nothing, confirming the first test (after killing the nc) I have tried restarting apache and even rebooting. I'd be glad to post any requested files, I just don't know which ones are relevant anymore.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

So, the URL for nagios is:

http://hostname:8080/nagios4

I was missing the 4

also, I added Listen directives right before the VirtualHost directives:

listen 8080
<VirtualHost *:8080>

That got it working

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!