Can't connect to localhost tho chkconfig apache2 says on

Questions about applications and software
Forum rules
Before you post please read this

Can't connect to localhost tho chkconfig apache2 says on

Postby nohairblair on Thu Apr 26, 2012 12:49 am

<SOLVED>when I try to connect to localhost in Firefox using 'localhost' or 'http://localhost/' or 'http://localhost/default.htm' I get an 'unable to connect' error. In Crome and Opera I get a list of google search/web sites. I've searched the FAQ and other threads but I can't find anything relative which makes me think that I'm doing something wrong that is probably quite simple to correct. Any help would be great! :oops:
p.s. I'm using Mint 12.
Last edited by nohairblair on Sun Apr 29, 2012 3:34 pm, edited 2 times in total.
nohairblair
Level 1
Level 1
 
Posts: 6
Joined: Sat Oct 08, 2011 12:41 pm
Location: Gold Coast, Queensland, Australia

Linux Mint is funded by ads and donations.
 

Re: Can't connect to localhost tho chkconfig apache2 says on

Postby DataMan on Thu Apr 26, 2012 4:43 am

You have properly installed LAMP into your Mint 12 right?

-DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1151
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www

Re: Can't connect to localhost tho chkconfig apache2 says on

Postby nohairblair on Thu Apr 26, 2012 5:26 am

Hey DataMan, that's what I'm trying to confirm. I'm following the directions from mysoomro at http://community.linuxmint.com/tutorial/view/486, and I got to the TESTING APACHE stage, but I'm blocked.
nohairblair
Level 1
Level 1
 
Posts: 6
Joined: Sat Oct 08, 2011 12:41 pm
Location: Gold Coast, Queensland, Australia

Re: Can't connect to localhost tho chkconfig apache2 says on

Postby DataMan on Thu Apr 26, 2012 5:59 am

what do you get when you?

http://localhost/

-DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1151
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www

Re: Can't connect to localhost tho chkconfig apache2 says on

Postby nohairblair on Thu Apr 26, 2012 7:13 am

if I use Firefox I get "unable to connect" if I use Opera I get "could not connect to remote server" and if I use Chrome I get "Oops! Google Chrome could not connect to localhost"
nohairblair
Level 1
Level 1
 
Posts: 6
Joined: Sat Oct 08, 2011 12:41 pm
Location: Gold Coast, Queensland, Australia

Re: Can't connect to localhost tho chkconfig apache2 says on

Postby DataMan on Thu Apr 26, 2012 8:49 am

I suspect that Apache is either not installed correctly or is not running.

Try this command (will return whether Apache is installed):

Code: Select all
ps -ef | grep httpd


-DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1151
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www

Re: Can't connect to localhost tho chkconfig apache2 says on

Postby nohairblair on Thu Apr 26, 2012 2:19 pm

by entering 'ps -ef | grep httpd' I get the following 'root 6343 6251 0 04:08 pts/0 00:00:00 grep --colour=auto httpd'

I have no idea what that means!!
nohairblair
Level 1
Level 1
 
Posts: 6
Joined: Sat Oct 08, 2011 12:41 pm
Location: Gold Coast, Queensland, Australia

Re: Can't connect to localhost tho chkconfig apache2 says on

Postby unkilbeeg on Fri Apr 27, 2012 4:09 pm

It means that httpd isn't running. You should probably try it again using "apache" as the string you grep for. The closest Mint machine I have is in another room (and firewalled off) but all the Debian and Ubuntu machines I can get to right now use "apache2" as the executable for the web server, not "httpd".

If you haven't already, type
Code: Select all
sudo /etc/init.d/apache2 start

and then try
Code: Select all
ps ax | grep apache2
unkilbeeg
Level 1
Level 1
 
Posts: 17
Joined: Tue Apr 27, 2010 5:02 pm

Re: Can't connect to localhost tho chkconfig apache2 says on

Postby nohairblair on Fri Apr 27, 2012 7:48 pm

Hey unkilbeeg,
with entering "sudo /etc/init.d/apache2 start" I get ".: 51: Can't open /etc/apache2/envvars"

and with entering "ps ax | grep apache2" I get "11100 pts/0 S+ 0:00 grep --colour=auto apache2"

again I can't see why apache2 will not open?
nohairblair
Level 1
Level 1
 
Posts: 6
Joined: Sat Oct 08, 2011 12:41 pm
Location: Gold Coast, Queensland, Australia

Re: Can't connect to localhost tho chkconfig apache2 says on

Postby nohairblair on Sun Apr 29, 2012 3:04 pm

Thanks Dataman and unkilbeeg for your help. I appear to have solved the problem by re-installing apache2 a number of times. Now when I enter "localhost" in the address line I get a "It Works" message! Now all I have to do is find out how to load a file into apache2. :roll:
nohairblair
Level 1
Level 1
 
Posts: 6
Joined: Sat Oct 08, 2011 12:41 pm
Location: Gold Coast, Queensland, Australia

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 18 guests