LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-23-2006, 01:56 AM   #1
vyperkt400
LQ Newbie
 
Registered: May 2006
Posts: 3

Rep: Reputation: 0
Noob questions (http server)


What I'm trying to do:

run web-based CRM software... this requires apache, mysql, perl basically to serve the application on the LAN via a loopback address (127.0.0.1) actual lan IP 192.168.0.4

From what I understand in Suse srv/www/htdocs is the folder that should be shown when accessing localhost... When I surf to //localhost I get "local host could not be found" (when I run another application I use
localhostort8080 and that works)

I have made sure that apache, sql, httpd are all running, the firewall has been configured and also disabled, and tried accessing localhost while logged in as root all with the same error.

What am I doing wrong or misunderstanding?
 
Old 05-23-2006, 02:16 AM   #2
imagineers7
Member
 
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310

Rep: Reputation: 30
Hi viperkt400,

Try firing this command:-
echo 127.0.0.1 localhost.localdomain localhost >> /etc/hosts


This will set an alias in your /etc/hosts file which will look then as:-

127.0.0.1 localhost.localdomain localhost

you may change localhost.localdomain to anything.


Hope, this will help you.


Bye
 
Old 05-23-2006, 02:49 AM   #3
greeklegend
Member
 
Registered: Feb 2006
Location: At a computer
Distribution: Ubuntu 7.04, LFS 6.3 rc1 (living dangerously ;), Windows XP
Posts: 75

Rep: Reputation: 15
Quote:
Originally Posted by vyperkt400
When I surf to //localhost I get "local host could not be found"
Does it work when you use 127.0.0.1 or 192.168.0.4 (or 127.0.0.1:8080 if its on port 8080)?
 
Old 05-23-2006, 07:01 AM   #4
dimis
LQ Newbie
 
Registered: May 2006
Posts: 20

Rep: Reputation: 0
when you open your browser, do you just type 'localhost' ?

Try typing http://localhost

Also, check your apache conf file and check which port is the server listening on.

Also try to do 'nmap localhost -p 80' , see if port 80 is open.
 
Old 05-23-2006, 10:27 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
If you want to open your application to other computers on your network, make
Apache listen to your regular IP, not the localhost interface.
The localhost interface is a "loopback", which means that any packets sent out by your computer on this
network interface only wind up back on your computer. Each machine (each network card) has it's own localhost interface and other machines can never contact your machine's localhost interface.

Most web servers listen to port 80 (which is the default for HTTP protocol). Hence, in browsers, you don't need to type:
http://something:80/
the port 80 is implied by using "http://" (HTTP protocol).

However, your Apache daemon seems to be listening to port 8080 (see apache config). Thus, you'll need to:
-either type "http://your_server:8080/" in your browser to force it to use port 8080 on the web server;
-or change the settings of Apache to use the standard port 80. Note that this has security implications, since ports < 1024 can only be "allocated" by root. Hence, Apache will need to (temporarily) run as root to attach itself to that port.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions from a noob Linux_n00b_57 Linux - Games 5 07-08-2005 04:11 PM
Several noob questions Easyrider Mandriva 1 02-15-2005 12:06 AM
Questions about what software to use to install a mail+http server system. papitu76 General 1 01-10-2005 02:33 PM
HTTP.CONF questions alejandroye Linux - Software 3 11-04-2004 01:36 PM
Linux email server and some HTTP server questions Steven6282 Linux - General 7 02-19-2003 03:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration