2

I'm facing a weird problem. When I access the web-accessible directory of my server via domain linked to it. It says:-

Not Found The requested URL / was not found on this server. 

When I run this command on my server (via putty), it displays few processes ids demonstrating that Apache web server is running (correct me).

root@...:~# pgrep apache 4733 13505 13506 13507 13508 13686 14199 17672 

But when I run this command, it says that httpd: unrecognized service

root@...:~# service httpd status httpd: unrecognized service 

Some other commands output:-

root@...:~# ps aux|grep -i http root 29401 0.0 0.0 6460 792 pts/0 S+ 02:21 0:00 grep --color=auto -i http root@...:~# chkconfig --list | grep httpd -bash: chkconfig: command not found root@...:~# find / -name httpd* /var/www/vhosts/lvps5-35-241-230.dedicated.hosteurope.de/httpdocs /var/www/vhosts/.skel/0/httpdocs /opt/psa/var/httpd_restart /usr/lib/apache2/modules/httpd.exp /usr/share/doc/apache2-doc/manual/fr/programs/httpd.html /usr/share/doc/apache2-doc/manual/pt-br/programs/httpd.html /usr/share/doc/apache2-doc/manual/da/programs/httpd.html /usr/share/doc/apache2-doc/manual/zh-cn/programs/httpd.html /usr/share/doc/apache2-doc/manual/tr/programs/httpd.html /usr/share/doc/apache2-doc/manual/en/programs/httpd.html /usr/share/doc/apache2-doc/manual/ja/programs/httpd.html /usr/share/doc/apache2-doc/manual/ko/programs/httpd.html /usr/share/doc/apache2-doc/manual/de/programs/httpd.html /usr/share/doc/apache2-doc/manual/es/programs/httpd.html /usr/share/doc/apache2-doc/examples/apache2/original/httpd.conf.gz /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-autoindex.conf /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-manual.conf /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-userdir.conf /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-vhosts.conf /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-languages.conf.gz /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-ssl.conf.gz /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-mpm.conf.gz /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-multilang-errordoc.conf /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-default.conf /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-dav.conf /usr/share/doc/apache2-doc/examples/apache2/original/extra/httpd-info.conf /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-autoindex.conf /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-manual.conf /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-userdir.conf /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-vhosts.conf /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-languages.conf.gz /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-ssl.conf.gz /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-mpm.conf.gz /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-multilang-errordoc.conf /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-default.conf /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-dav.conf /usr/share/doc/apache2-doc/examples/apache2/extra/httpd-info.conf /etc/apache2/httpd.conf /etc/apache2/httpd.pem root@...:~# whereis httpd httpd: root@...:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.5 LTS Release: 12.04 Codename: precise root@...:~# ls /etc/init.d README hostname network-interface-container plymouth-upstart-bridge rc spamassassin udevtrigger apache2 hwclock network-interface-security portmap rc.local ssh umountfs bind9 hwclock-save networking portmap-wait rcS stop-bootlogd umountnfs.sh bluetooth keymap.sh ondemand postfix reboot stop-bootlogd-single umountroot bootlogd killprocs passwd procps rpcbind-boot sudo unattended-upgrades console-screen.sh klogd pc-remote psa rsync sw-cp-server urandom courier-imap module-init-tools plymouth psa-firewall saslauthd sysklogd wide-dhcpv6-client cron modules_dep.sh plymouth-log psa-firewall-forward screen-cleanup udev x11-common dbus mongodb plymouth-ready psa-spamassassin sendsigs udev-fallback-graphics xinetd fetchmail mysql plymouth-splash quota single udev-finish halt network-interface plymouth-stop quotarpc skeleton udevmonitor root@...:~# ls /etc/xinetd.d chargen daytime discard echo ftp_psa poppassd_psa time 
1
  • 3
    Are you sure the service is named "httpd"? If I remember correctly the Ubuntu service for apache is called "apache2". Commented Mar 18, 2015 at 2:03

2 Answers 2

3

If you use the command 'lsof' and look for 'http' you can easily see if your Apache website processes are indeed running on Ubuntu. In my case:

 sudo lsof | grep ':http ' 

And I see

 apache2 2202 root 4u IPv6 15516 0t0 TCP *:http (LISTEN) apache2 22949 www-data 4u IPv6 15516 0t0 TCP *:http (LISTEN) apache2 22950 www-data 4u IPv6 15516 0t0 TCP *:http (LISTEN) apache2 22951 www-data 4u IPv6 15516 0t0 TCP *:http (LISTEN) apache2 22952 www-data 4u IPv6 15516 0t0 TCP *:http (LISTEN) apache2 22953 www-data 4u IPv6 15516 0t0 TCP *:http (LISTEN) 

Thus confirming that the processes in Unbuntu are indeed named 'apache2' and not httpd.

3
  • How can I confirm that apache2 is running fine and httpd is not required? When I go to the my server's IP address, it says Not Found... The requested URL / was not found on this server.. Isn't this proves that something is not working in apache2? Commented Mar 18, 2015 at 4:38
  • It proves that you might have some problems in the configuration file somewhere but I was under the impression that you were trying to confirm that the processes were present. Commented Mar 18, 2015 at 5:46
  • Can you take a look at this? serverfault.com/questions/676310/… Commented Mar 18, 2015 at 5:56
-1

What you want is:

#systemctl status apache2 

not ... httpd.

1
  • 1
    The question is about Ubuntu version 12.04. Commented Jan 2, 2020 at 20:09

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.