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:
Note that the "could not determine the server's fully qualified domain name" part is a warning not an error, you can get rid of it by putting this in any of your Apache configuration files:Code:sudo netstat -tulpn | grep :80
And then restart Apache:Code:ServerName foo.com
SamCode: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 :
Port 80 seems to be busy . How do you solve this ?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:
...and then open the main apache config file using:Code:sudo apt-get update sudo apt-get install nano
Make your changes, then CTRL X to exit, and save when prompted.Code:sudo nano /etc/apache2/apache2.conf
You might notice these lines at the bottom of the apache.conf file:
These statements auto-load files like /etc/apache2/conf-enabled/foo.conf (related chunks of config) and /etc/apache2/sites-enabled/foo.com.conf (virtualhost files, which are config files for each individual website). So the modular way to do things is add files to /etc/apache2/conf-available/foo.conf and use the a2enconf command to create a symlink to the conf-enabled directory, e.g.:Code:# Include generic snippets of statements IncludeOptional conf-enabled/*.conf # Include the virtual host configurations: IncludeOptional sites-enabled/*.conf
BTW, the related command for virtualhost files is a2ensite, and the commands to un-symlink the files again are a2disconf and a2dissite respectively. You can see that for my Apache server, I added a files called /etc/apache2/conf-available/servername.conf and symlinked it to /etc/apache2/conf-enabled/servername.conf because I wanted to keep it separate:Code:sudo a2enconf foo
servername.conf contains: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
You need to reload apache after making changes like this:Code:# added 2014.03.25 to suppress apache warning on reboot ServerName samhobbs
If you want to read about apache virtualhost files, you can check out this tutorial I wrote last year.Code:sudo service apache2 reload
Sam
- Top
- Bottom
Comment
-
forgot the other part of your question...
tntnet is (apparently) a C++ webserver. Unless you installed it yourself, I guess it was pulled in by some other package.Originally posted by kdeuser View PostPort 80 seems to be busyCode: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:
SamCode: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 :
Followed by the `apt-cache --installed rdepends tntnet` command :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$
Hope this helps.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:
...but that won't work until apache can bind to port 80, which it can't do while tntnet is running.Code:sudo service apache2 start
Try this:
(you get the idea, we're going to keep going until we find whatever pulled the package in - hopefully!)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 :
Have not knowingly installed dependencies.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
Users Viewing This Topic
Collapse
There are 0 users viewing this topic.





Comment