can not start localhost

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 3722 Views - Last Post: 21 October 2011 - 05:57 PM

#1 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

can not start localhost

Posted 03 September 2011 - 07:42 AM

hi all,

I am new to ubutu using 10.10 and installed xampp for ubutu and it worked properly.
but when I restart the mechine I couldnt go to localhost.

Before, restarting the machine I set the passwords for phpadmin and other programes that we can.

does anybody know how to solve this ?

thx in advance,
menuka
Is This A Good Question/Topic? 0
  • +

Replies To: can not start localhost

#2 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,899
  • Joined: 10-May 07

Re: can not start localhost

Posted 03 September 2011 - 08:09 AM

** Topic moved to Web Servers & Hosting **

I would suggest checking the output of ps to assure XAMP is running, & checking netstat to assure that Apache is bound & listening to port 80.
Was This Post Helpful? 1
  • +
  • -

#3 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Re: can not start localhost

Posted 03 September 2011 - 08:42 AM

I am new to ubuntu, can U explain how to do that , i mean necessay commands for the terminal.


thx in advance,
menuka.
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,899
  • Joined: 10-May 07

Re: can not start localhost

Posted 03 September 2011 - 12:31 PM

ps aux | grep http
netstat -ta | grep LISTEN
Was This Post Helpful? 1
  • +
  • -

#5 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1150
  • View blog
  • Posts: 2,528
  • Joined: 05-May 05

Re: can not start localhost

Posted 03 September 2011 - 04:13 PM

Quote

I am new to ubutu using 10.10 and installed xampp for ubutu and it worked properly.
but when I restart the mechine I couldnt go to localhost.


Do you mean when you enter http://localhost.com into your browser the Apache page doesn't show? If so, it's probably because Apache isn't running. I'm almost sure that you have to explicitly set Apache to be a start-up program.

Just start it from the command line. See this tutorial for more details. Depending on how you installed XAMP that tutorial may or may not work. This tutorial explains how to make Apache a start-up service.
Was This Post Helpful? 0
  • +
  • -

#6 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Re: can not start localhost

Posted 03 September 2011 - 08:27 PM

View Postno2pencil, on 03 September 2011 - 12:31 PM, said:

ps aux | grep http
netstat -ta | grep LISTEN


hi ,
[url]http://localhost[/url] still doesnt work. I get the same error page.
one thing I want to know as a beginer is how u tell me the code to run? I mean did u google and tell me or U know that
as u always do that congiuration
I always meet this problem. It is hard to remember these codes.
Is there any way that easily learn these codes?

to answere for this question is more appreciated than anything.
:-)

thx in advance,
menuka
Was This Post Helpful? 0
  • +
  • -

#7 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,899
  • Joined: 10-May 07

Re: can not start localhost

Posted 03 September 2011 - 08:54 PM

View Postmenukadevinda, on 03 September 2011 - 11:27 PM, said:

one thing I want to know as a beginer is how u tell me the code to run? I mean did u google and tell me or U know that
as u always do that congiuration

I've been running Linux/Unix web servers since 2005.

View Postmenukadevinda, on 03 September 2011 - 11:27 PM, said:

Is there any way that easily learn these codes?

Just keep doing it.

So to better help you, what is the output of those commands that I suggested?
Was This Post Helpful? 1
  • +
  • -

#8 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Re: can not start localhost

Posted 04 September 2011 - 02:16 AM

this is the output

root@menuka-OEM:~# ps aux | grep http
root 1818 0.0 0.0 4012 764 pts/0 S+ 09:13 0:00 grep --color=auto http
root@menuka-OEM:~# netstat -ta | grep LISTEN
tcp 0 0 localhost.localdoma:ipp *:* LISTEN
tcp6 0 0 menuka-OEM:ipp [::]:* LISTEN
Was This Post Helpful? 0
  • +
  • -

#9 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,899
  • Joined: 10-May 07

Re: can not start localhost

Posted 04 September 2011 - 02:24 AM

Lets try this :

which apachectl
which httpd
apachectl -k start

Can you post the output of those?
Was This Post Helpful? 0
  • +
  • -

#10 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Re: can not start localhost

Posted 04 September 2011 - 02:55 AM

g:: command not found

root@menuka-OEM:~# apt-get install apache2.2-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apache2-utils apache2.2-bin libapr1 libaprutil1 libaprutil1-dbd-sqlite3
libaprutil1-ldap
Suggested packages:
apache2-doc apache2-suexec apache2-suexec-custom
The following NEW packages will be installed:
apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaprutil1-ldap
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,284kB of archives.
Configuration file `/etc/init.d/apache2'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** apache2 (Y/I/N/O/D/Z) [default=N] ? y
Installing new version of config file /etc/init.d/apache2 ...
Enabling site default.
Enabling module alias.
Enabling module autoindex.
Enabling module dir.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module status.
Enabling module auth_basic.
Enabling module deflate.
Enabling module authz_default.
Enabling module authz_user.
Enabling module authz_groupfile.
Enabling module authn_file.
Enabling module authz_host.
Enabling module reqtimeout.
Processing triggers for libc-bin ...
Was This Post Helpful? 0
  • +
  • -

#11 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Re: can not start localhost

Posted 04 September 2011 - 03:07 AM

oot@menuka-OEM:~# which apachectl
/usr/sbin/apachectl
root@menuka-OEM:~# which httpd
root@menuka-OEM:~# apachectl -k start
/usr/sbin/apachectl: 148: /usr/sbin/apache2: not found
Action '-k start' failed.
The Apache error log may have more information.
root@menuka-OEM:~#
Was This Post Helpful? 0
  • +
  • -

#12 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,899
  • Joined: 10-May 07

Re: can not start localhost

Posted 04 September 2011 - 03:10 AM

So if you look at /usr/sbin/apachectl, what is on line 148?

Also, check the output of which apache2

Maybe it just needs updated, maybe it's not installed correctly.
Was This Post Helpful? 1
  • +
  • -

#13 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Re: can not start localhost

Posted 04 September 2011 - 03:14 AM

/usr/sbin/apachectl: 148: /usr/sbin/apache2: not found
Action '-k start' failed.


ok then how to proceed?

I again run the following code

apt-get install apache2.2-common

Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2.2-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
and got the above result.
it says apache2.2-common is already the newest version.

so what is next?
Was This Post Helpful? 0
  • +
  • -

#14 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5191
  • View blog
  • Posts: 26,899
  • Joined: 10-May 07

Re: can not start localhost

Posted 04 September 2011 - 03:18 AM

What instructions did you follow to install Apache?
Was This Post Helpful? 0
  • +
  • -

#15 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Re: can not start localhost

Posted 04 September 2011 - 03:37 AM

Go to a Linux shell and login as the system administrator root:
su

Extract the downloaded archive file to /opt:
tar xvfz xampp-linux-1.7.4.tar.gz -C /opt

o start XAMPP simply call this command:
/opt/lampp/lampp start
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2