Announcement
Collapse
No announcement yet.
Starting apache2 server failed ?
Collapse
This topic is closed.
X
X
-
Hi claydoh,
Found 2 links which basically cover most of the methods used over different sites.
http://stackoverflow.com/questions/2...2-restart-fail
http://fogproject.org/forum/threads/...p-start.11106/
The second link is what in effect answered my own question in that apache2 was broken due to an external package.
This seems to be on the ball as i am still using bm2lts (it works) and with Nvidia but should you update/upgrade the software , you break distro function.
- Top
- Bottom
Comment
-
Hmmm Please copy and paste the text in the terminal instead of posting a screenshot. makes for more work quoting any part of the error messages
https://help.ubuntu.com/community/Ap...lling_Apache_2
This probably would have been one of the first places to go, it even has a section specific to the error message you posted in the OP.
As we don't have any info on exactly what you did, and I sure cannot tell from link #2 how an external package was involved,
Then again, it is 430 in the morning, and I have yet to go to bed
- Top
- Bottom
Comment
-
Are you running any other http servers? That error looks to me like something else is already listening on port 80, so Apache was unable to bind to it.
You can check which process it is with this command:
Code:sudo netstat -tulpn | grep :80
Code:ServerName foo.com
Code:sudo service apache2 restart
- Top
- Bottom
Comment
-
@Feathers McGraw,
There`s still a small problem with a kernel added to the original kernel.
Actually, have 3 kernels installed in Trusty 14.04.2 .
- 3.15.10 ( some more numbers here........ )
- 3.16.0.31
- 3.19.2 ( this kernel is excellent but a vital part of hardware does not output to screen )
Ran `sudo netstat -tulpn | grep :80` which gave me :
Code:reel@BM2LTSR66RBex:/media/hd/home/reel$ sudo netstat -tulpn | grep :80 sudo: unable to resolve host BM2LTSR66RBex [sudo] password for reel: tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3459/tntnet tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN 3511/vdradmind tcp 0 0 0.0.0.0:8002 0.0.0.0:* LISTEN 4708/lighttpd tcp 0 0 0.0.0.0:8009 0.0.0.0:* LISTEN 4901/shellinaboxd tcp6 0 0 :::80 :::* LISTEN 3459/tntnet tcp6 0 0 :::8008 :::* LISTEN 4870/vdr reel@BM2LTSR66RBex:/media/hd/home/reel$
Concerning that `warning` message. In /etc/apache2/ i count 7 folders plus 3 files . Attempted to copy/paste to any folder/file but the os refused, so not clear on which folder /file to place `ServerName foo.com`in.Last edited by kdeuser; Mar 26, 2015, 04:59 AM.
- Top
- Bottom
Comment
-
The apache config files are owned by root, so you need to use sudo to edit them.
Nano is quite a nice and easy commandline text editor, I can't remember if it's installed by default, but if not you can install it like this:
Code:sudo apt-get update sudo apt-get install nano
Code:sudo nano /etc/apache2/apache2.conf
You might notice these lines at the bottom of the apache.conf file:
Code:# Include generic snippets of statements IncludeOptional conf-enabled/*.conf # Include the virtual host configurations: IncludeOptional sites-enabled/*.conf
Code:sudo a2enconf foo
Code:sam@samhobbs:~$ ll /etc/apache2/conf-enabled total 8 drwxr-xr-x 2 root root 4096 Apr 2 2014 ./ drwxr-xr-x 8 root root 4096 Mar 11 12:56 ../ lrwxrwxrwx 1 root root 30 Mar 25 2014 charset.conf -> ../conf-available/charset.conf lrwxrwxrwx 1 root root 40 Mar 25 2014 javascript-common.conf -> ../conf-available/javascript-common.conf lrwxrwxrwx 1 root root 44 Mar 25 2014 localized-error-pages.conf -> ../conf-available/localized-error-pages.conf lrwxrwxrwx 1 root root 46 Mar 25 2014 other-vhosts-access-log.conf -> ../conf-available/other-vhosts-access-log.conf lrwxrwxrwx 1 root root 33 Mar 25 2014 phpmyadmin.conf -> ../conf-available/phpmyadmin.conf lrwxrwxrwx 1 root root 31 Mar 25 2014 security.conf -> ../conf-available/security.conf lrwxrwxrwx 1 root root 36 Mar 25 2014 serve-cgi-bin.conf -> ../conf-available/serve-cgi-bin.conf lrwxrwxrwx 1 root root 33 Mar 25 2014 servername.conf -> ../conf-available/servername.conf
Code:# added 2014.03.25 to suppress apache warning on reboot ServerName samhobbs
Code:sudo service apache2 reload
Sam
- Top
- Bottom
Comment
-
forgot the other part of your question...
Originally posted by kdeuser View PostCode:reel@BM2LTSR66RBex:/media/hd/home/reel$ sudo netstat -tulpn | grep :80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3459/tntnet
Can you run this command? It should show us what installed tntnet:
Code:apt-cache --installed rdepends tntnet
- Top
- Bottom
Comment
-
Thanks for the explanation there but still seem to get errors .
I added the line `ServerName foo.com` to the very bottom of `apach2.conf via the `sudo nano /etc/apache2/apache2.conf` command.
Output :
Code:reel@BM2LTSR66RBex:/media/hd/home/reel$ sudo service apache2 reload sudo: unable to resolve host BM2LTSR66RBex [sudo] password for reel: Reloading web server: apache2 failed! Apache2 is not running ... (warning). reel@BM2LTSR66RBex:/media/hd/home/reel$
Code:reel@BM2LTSR66RBex:/media/hd/home/reel$ apt-cache --installed rdepends tntnet tntnet Reverse Depends: tntnet-runtime reel@BM2LTSR66RBex:/media/hd/home/reel$
- Top
- Bottom
Comment
-
Ah, I forgot apache has to already be running to be reloaded. Since it didn't start, it isn't running. You will have to do:
Code:sudo service apache2 start
Try this:
Code:apt-cache --installed rdepends tntnet-runtime
- Top
- Bottom
Comment
-
Readout of `apt-cache --installed rdepends tntnet-runtime`:
Code:reel@BM2LTSR66RBex:/media/hd/home/reel$ apt-cache --installed rdepends tntnet-runtime tntnet-runtime Reverse Depends: tntnet libtntnet12 reel@BM2LTSR66RBex:/media/hd/home/reel$
- Top
- Bottom
Comment
-
Result :
Code:reel@BM2LTSR66RBex:/media/hd/home/reel$ sudo service tntnet stop sudo: unable to resolve host BM2LTSR66RBex [sudo] password for reel: Stopping web server: tntnet. reel@BM2LTSR66RBex:/media/hd/home/reel$
- Top
- Bottom
Comment
Comment