LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   help with testing a website on a linux box from a standerd pc in a browser (https://www.linuxquestions.org/questions/linux-general-1/help-with-testing-a-website-on-a-linux-box-from-a-standerd-pc-in-a-browser-376252/)

tittosimu 10-24-2005 12:27 AM

help with testing a website on a linux box from a standerd pc in a browser
 
I set up a linux box (fedora core 4) so that i can test out webpages before i put them on my real webserver outside of my local lan. I want to be able to load a page on a normal pc that is located on the linux box over the network in a standerd web browser. I have tried the way i would with windows based machines by just typeing in the network address according to the name of the linux box but it won't load. The name that comes up for the linux box is local host 3 but i never chose that to be the acct or username. So i am wondering where that came from but more importantly how to view a page that is currently on a linux box from a pc in the lan. Thanks to whoever can help.

Titus

Dark_Helmet 10-24-2005 01:37 AM

Forget about "localhost3" or anything like that; that won't do you any good.

First, make sure your web server is properly configured and running. Most default installs of Apache will come with sane configurations to accomplish what you want. To verify the web server is actually running, type the following at a command prompt:
Code:

ps -aux | grep httpd
You should see at least one line ending with "httpd" (not counting the copy of "grep httpd" that may appear). If you don't see the "httpd" entry, then your webserver isn't running. You'll need to start it up before the linux box can serve web pages. To do so, you can run the following command as root:
Code:

apachectl start
If your web server is running, then try to connect by referring to the linux machine's IP address. To find out your machine's IP address, execute the following command as root:
Code:

ifconfig eth0 | grep "inet addr" | cut -f 2 -d: | cut -f 1 -d ' '
Replace "eth0" with the appropriate network interface. If you're not sure what that means, then eth0 is probably what you want. Then try connecting with:
http://192.168.0.100

But replace the IP address in blue with the output of the ifconfig command above.


If you still can't connect, then check two things:

1. Do you have web pages in the proper place?
Web pages in FC4 are stored in /var/www/html

2. Do you have a firewall blocking web access?
Execute the following command as root:
Code:

system-config-securitylevel
In the window that pops up, make sure there is a checkmark next to "WWW (HTTP)"


If all of the stuff I mentioned above appears to be correct, then you have a non-standard problem. The first place I would look is your Apache configuration file. You'll probably have to do some reading to understand what configuration options are available and how to interpret what your current configuration is doing.


All times are GMT -5. The time now is 10:32 AM.