LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-07-2003, 01:38 AM   #1
NW Otter
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake
Posts: 27

Rep: Reputation: 15
Apache on Mandrake, I'm lost


I'm a complete newbie with Windows IIS experience. I am trying to set up a Linux/Apache/PHP/MySQL development environment using Mandrake Linux. I chose Mandrake as a professional acquaintance recommended it.

Sooo... I have installed Mandrake Linux 9.1 on a box connected to my network. My router appears to be assigning an IP address to the machine as I can surf the web from the installation. I can tell that Apache 2.0 has been installed by looking at the remove package utility. Beyond that, I'm lost.

How do I configure Apache so I can see it from one of my other computers? Where do I put the html files? I can't figure out how to get to Apache, I think I am lost in KDM... I have looked at a bunch of documentation but I can't seem to find a simple explanation on how to set this up using the mandrake distribution. I may need some serious hand-holding or a Linux for dummies book! Any recommendations on where to go from here?
 
Old 09-07-2003, 03:27 AM   #2
ZenithRS
LQ Newbie
 
Registered: Dec 2002
Posts: 24

Rep: Reputation: 15
Apache is probably already running... at a shell prompt, try

/etc/rc.d/init.d/httpd status

If it says it's running then cool... if not try...

/etc/rc.d/init.d/httpd start

Of course you could point a browser at the box and see what pops up too

You'll probably find the document root is /var/www/html but you can check the httpd.conf file. Have read of it anyway, it's interesting. You'll probably find it in /etc/httpd/conf

Good luck
 
Old 09-07-2003, 01:49 PM   #3
NW Otter
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake
Posts: 27

Original Poster
Rep: Reputation: 15
Cool. Thanks for the path information. Apache is running.

I have managed to figure out how to login as the Root user in KDE now, I think that has helped me to see more of the innards. I cannot see the web server on my network, though. It appears that the box is using the ip address 127.0.0.1 and is using the name localhost. But when I enter http:\\localhost\index.shtml in a browser on my network, nothing.

I guess I need to figure out if this IP is assigned or is default and conflicting on my network. My router should assign addresses... also the localhost name maybe conflicting with my W2K server, but I really am not sure what is going on yet. I think I need to find the command equivalant to ipconfig in windows...?

I'll keep reading Inside Linux and moving up the learning curve...
 
Old 09-07-2003, 01:59 PM   #4
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
http://localhost

should bring up the default page?
 
Old 09-07-2003, 02:23 PM   #5
NW Otter
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake
Posts: 27

Original Poster
Rep: Reputation: 15
Probably having a IP address problem. My router should be assigning a 192.168.1.x address and my Linux box has 127.0.0.1.

Not sure how it is able to browse the web, but I think this could be the problem.

Another funny thing is that when I enter http:\\localhost in a IE browser, I can see it resolve to 127.0.0.1 but the default page does not show. Pretty strange...
 
Old 09-07-2003, 02:51 PM   #6
NW Otter
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake
Posts: 27

Original Poster
Rep: Reputation: 15
Correction. I just looked at DrakConnect in the Mandrake control center and my IP address is 192.168.1.103 so it does look like I am pulling from the router. So why does Apache think the address is 127.0.0.1?
 
Old 09-07-2003, 03:02 PM   #7
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
isnt the default setting localhost(127.0.0.1)?
if i remember right, it asks during install if u want it set to 127.0.0.1?

(im not good at this - just contributing - ill get to learn too)

maybe there is a setting in httpd.conf for this?
 
Old 09-07-2003, 03:04 PM   #8
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I thought you had Windows IIS experience. Windows and LINUX have the same setup when viewing web sites or other server services on the local system.

The IP address 127.0.0.1 is the loopback address. You can ping localhost. It will give you the loopback address and where you ping from. Your system maybe 192.168.1.100 or something.

You can also find out your IP address by typing /sbin/ifconfig (I think)

If your router has a web setup configurator, you can look at the routing table or DHCP table.

Typing http:\\localhost will give you an error. The correct address is http://localhost. If your Windows computer has a web server running. You will see the site. If you want to access your LINUX system from another system you need to note the IP address. This goes the same for WINDOWS and other OS.

You can use a dynamic IP address, changes everytime you boot up, or static IP address, permanment IP adderess. You can take the information that you got from ipconfig using a Windows computer and plug the information into LINUX. You may have to install linuxconf if you don't want to edit network configuration files.

The information that you need:
Gateway address
DNS address (atleast one)
domain name that the ISP gives you
An IP address that is not given by the router or 192.168.1.200 for starters
 
Old 09-07-2003, 05:03 PM   #9
ZenithRS
LQ Newbie
 
Registered: Dec 2002
Posts: 24

Rep: Reputation: 15
Quote:
Originally posted by NW Otter
Correction. I just looked at DrakConnect in the Mandrake control center and my IP address is 192.168.1.103 so it does look like I am pulling from the router. So why does Apache think the address is 127.0.0.1?
Try http://192.168.1.103 from a box on your network
 
Old 09-07-2003, 06:46 PM   #10
NW Otter
LQ Newbie
 
Registered: Sep 2003
Distribution: Mandrake
Posts: 27

Original Poster
Rep: Reputation: 15
Cool. I can access the server using the IP address. Next question.

With a windows server you can access the website using the machine name. So if you named your machine Otter, you would be able to access it locally using http://otter. Can you do this with Apache? It would save having to look up the IP address each time.
 
Old 09-07-2003, 06:51 PM   #11
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
edit /etc/hosts
 
Old 09-07-2003, 07:02 PM   #12
ZenithRS
LQ Newbie
 
Registered: Dec 2002
Posts: 24

Rep: Reputation: 15
Quote:
Originally posted by NW Otter
Cool. I can access the server using the IP address. Next question.

With a windows server you can access the website using the machine name. So if you named your machine Otter, you would be able to access it locally using http://otter. Can you do this with Apache? It would save having to look up the IP address each time.
As h/w said, edit your /etc/hosts file. That's the hosts file on the machine you're browsing from. Just add a line for your apache server.

webserver 192.168.1.103

Do the same to the hosts file on each box on your LAN.

With the IP, you'll probably find the server gets handed the same IP every time anyway if it's using DHCP to get an address. If not, adding the above to hosts won't achieve anything. Then you'll be getting in Network Information Server territory.
 
Old 09-07-2003, 09:31 PM   #13
nkraft
LQ Newbie
 
Registered: Sep 2003
Location: York, PA
Distribution: MAndrake, Slackware
Posts: 8

Rep: Reputation: 0
Same problem... trying to build a web server, where i can update the content from afar. What is the next step in being able to update the content?
 
Old 09-07-2003, 09:43 PM   #14
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
by update the 'content', you mean? (creating/editing webpages? or editing server config files? or ...)

also, what does "build a web server" mean? are you trying to install one? make one on ur own?

and which server are u running? apache?
 
Old 09-07-2003, 09:49 PM   #15
nkraft
LQ Newbie
 
Registered: Sep 2003
Location: York, PA
Distribution: MAndrake, Slackware
Posts: 8

Rep: Reputation: 0
installed apache (well, the version that came with mandrake 9.1) and by updating the content i mean the pages... whats the best way to get stuff up there... i tried using smb but i can set it up only to view from windows, not to write, although i have the setting in smb.conf set up for allowing writing to the folder... i guess i must have missed something...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Lost with MySql, PHP and Apache here Mega Man X Linux - Software 12 01-28-2004 08:02 AM
mandrake lost after slackware Y0jiMb0 Linux - General 27 11-13-2003 03:29 PM
completely lost mandrake 9.0 utterconfusion Linux - Newbie 12 07-09-2003 03:57 PM
Mandrake 9.0 --- lost menus chingasman Linux - Distributions 1 12-28-2002 12:56 PM
Totally lost - RH 7.1, apache, php4, postgreSQL setup marktaff Linux - Newbie 1 09-19-2001 03:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:17 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