Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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...
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...
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?
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
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?
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.
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.
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.