Page 1 of 1

Apache - It Works! [SOLVED]

Posted: 24 Jan 2011, 17:38
by scoobynz
OK, I have nuked my server – trying to install a start-up script for rtorrent from here;

http://forums.rutorrent.org/index.php?topic=256.0

This has obviously interfered with the apache/apache2 set-up – not my strongest area.

If I go to http://www.mydomain.com, all i get is a white page saying “It Works!” I assume that this is the default apache2 page, is this the index.html kept at var/www?

If I try to go to any other page in my domain, e.g.http://www.mydomain.com/admin or http://www.mydomain.com/nzbgetweb etc all I get are “Not Found, The requested URL /xxxxxx was not found on this server.

When I try to restart apache2, via /etc/init.d/apache2 restart, I get the following error;

Code: Select all

bubba:/home/craig# /etc/init.d/apache2 restart
Restarting web server: apache2(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
 failed!
OK, so I found out what was running on port 80 via;

Code: Select all

netstat -lnp | grep '0.0.0.0:80'
which told me the process was apache. So I killed this process. And then restarted the webserver. Now my pages load (e.g. http://www.mydomain.com/admin) but http://www.mydomain.com, still gives me “It Works!”

I have tried removing and reinstalling the bubba-backend package, but this does not fix the problem - as a matter of fact all I get are errors;

Code: Select all

bubba:/home/craig# apt-get remove bubba-backend
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  bubba bubba-backend bubba-frontend
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 4678kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 46697 files and directories currently installed.)
Removing bubba-frontend ...
Site bubba disabled.
Run '/etc/init.d/apache2 reload' to activate new configuration!
Enabling site default.
Run '/etc/init.d/apache2 reload' to activate new configuration!
Restarting web server: apache2 ... waiting ..
Removing bubba-backend ...
No diversion `diversion of /etc/hostapd/hostapd.conf to /etc/hostapd/hostapd.conf.distrib by bubba-backend', none removed
/var/lib/dpkg/info/bubba-backend.prerm: line 26: [: missing `]'
No diversion `diversion of /etc/cups/cupsd.conf to /etc/cups/cupsd.conf.distrib by bubba-backend', none removed
/var/lib/dpkg/info/bubba-backend.prerm: line 26: [: missing `]'
No diversion `diversion of /etc/samba/smb.conf to /etc/samba/smb.conf.distrib by bubba-backend', none removed
/var/lib/dpkg/info/bubba-backend.prerm: line 26: [: missing `]'
dpkg-divert: mismatch on divert-to
  when removing `diversion of /etc/dhcp3/dhclient-enter-hooks.d/samba to /etc/dhcp3/dhclient-exit-hooks.d/samba by bubba-backend'
  found `diversion of /etc/dhcp3/dhclient-enter-hooks.d/samba to /etc/bubba/samba-dhcp3.hook.distrib by bubba-backend'
dpkg: error processing bubba-backend (--remove):
 subprocess pre-removal script returned error exit status 2
Setting up firewall...done.
Disable offload on wan/lan interfaces...done.
dpkg: bubba: dependency problems, but removing anyway as you request:
 bubba-backend depends on bubba.
Removing bubba ...
Errors were encountered while processing:
 bubba-backend
E: Sub-process /usr/bin/dpkg returned an error code (1)
bubba:/home/craig#

So, it appears that I have muddled up the apache config. I need to obviously stop this process apache starting on boot and to point the server away from the file that is giving “It Works!” to the correct place – wherever that is.

Can anybody help me, I am out of my depth! Any assistance much appreciated.

Regards,
C

Re: Apache - It Works! [SOLVED]

Posted: 25 Jan 2011, 04:35
by scoobynz
Well,

I have done a bit of tinkering with success. I found that I had duplicate files in my /etc/apache2/sites-enabled/ folder. I had a file called “default”, which I removed. Now I only have the file named “bubba.”

I also had a folder called /etc/apache/ which contained index.html etc. I renamed this to apache_old, restarted and everything now ok.


C