Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache on 2 machines with router

Status
Not open for further replies.

kammimoon68

Technical User
Jan 30, 2006
10
US
I have 2 machines running Win XP. This is a home network. We have a cable modem and a router so both machines can get online. I need Apache on both machines. I can get it up and running on one but not both. Can someone please explain how to do this? And before you say tutorial.... I've looked and I can't find anything. Sorry just very frustrated.
 
Apache should run no problem on multiple machines. Is the problem you can't see both of them from outside the home network?

Do you have a router between the modem and your computers?

When you try to start Apache on second machine, what error messages do you get?

What are IP addresses of XP boxes.

\0
 
Yes there is a router between the machines and the modem.
The error message I got was a syntax one so I fiddled with that and got no more error, but when testing the configuration it wouldn't display the test page. So I tried on the other maching and now apache won't start on it at all. It says I have a syntax error in FollowSymLinks+EcecCGI but I didn't change that. The syntax error on the other machine was "Listen allows one value. IP address or IP address and port number" (or something like that). Apache was running fine on the first machine yesterday. This is for a class that we are both taking and we don't need access from any computer but the ones in question. Why do you need my IP address? Just curious.
 
Okay I put a space in FollowSymLinks +EcecCGI and now it is running, but it still won't pull up the test page.
 
How are you trying to connect to it to get this test page? Hopefully something like or
Make sure there is a test page or index.html file in the document root (I think it's a folder named 'htdocs' or or something similar under windows).
 
I used localhost and my I tried my ip address. Yes htdocs is there with all the files.
 
I askedabout ip address because I'm curious if you set up private class c network (192.168.) or if windows APIPA provided addresses (169.254.) APIPA gives me nothing but headaches.

Make sure the DocumentRoot directive points to where your testpage is.

IP address is really only needed if the box has more than one IP address bound to it and different web sites are to listen at different ips.

Listen directive can be port only or 0.0.0.0:80

ExecCGI is for perl type scripting or cgi executables. Note the spelling!

When you say it won't pull up test page, is it 404 not found or connection refused. Try connecting with Netscape Mozilla or Firefox. you get better diagnostics than with M$ Internet Exploder.

Also you can try telnet. From a command window, open connection with
telnet 80
if connection is accepted (terminal window may go blank) type
GET / <enter>
you should see a bunch of html scroll by. GET is in Upper Case!

Still having issues? Get a fresh httpd.conf file and go back to defaults. Then start monkeying around again.

if you explicitly call for test page does it show up?

Is DirectoryIndex directive set for index.html?

\0
 
196.168 to answer your question. Both boxes. I changed listen to IPaddress:8080.Directory index is set to index.html.var but it was like that on install I didn't change it. Should I?
 
make sure when you connect you do
since you are not using default port 80
ie requires the http:// when specifying a port
FireFox/Mozilla does not (they're a little smarter)

I would add 'index.html' to Directory index
like
DirectoryIndex index.html.var index.html index.php

the .var version has to do with internationalized versions. I'm not real fluent on that.

You didn't say what response you did get or what browser you are using.

Jeb Beasley
\0
 
I am using Internet Explorer 6 ant I get this:
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.
 
Still no luck. I don't understand since it did work yesterday.
 
<Directory />
Options FollowSymLinks+ExecCGI
AllowOverride None
</Directory>

ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"

AddHandler cgi-script .cgi .pl

These are the things I put in when I installed. I had instructions from my instructor. The only othe thing was Listen.
 
It may be a typo, but <Directory /> should not have the slash in it. And don't forget the space after FollowSymLinks

It sounds like apache is not running, at least not on the port you expect. Test your config file by running httpd -t

copy the httpd.conf from the machine that is running.

Is IIS hogging the port?

After you think you have apache running, run netstat -a to display all the connections and ports in use.

ping your ip address. (ping 193.168.x.xxx) if you are using dhcp from your router it may have changed. run ipconfig to check it out

exactly what url do you type in IE? Don't forget the :8080

\0

 
I took the forward slash out of directory and it gave me the test page on this computer. Okay I can get the test page on both computers this morning, but I didn't take the forward slash out of the other config file. What does that mean? If anything? I did run through MS steps to set up a home network on this computer this morning. And I ran a ping on both ip addresses. Everything looked fine. The url I have been typing in on both computers is Niether gave me the test page yesterday but both gave it to me just now. What exactly am I looking for when I run netstat -a. In any case both computers are listening on port 8080. Now when I try to start Apache in console it says only one usage of each socket address is normally permitted make_sock: could not bind IP address no listening sockets available.unable to load logs. It says the same thing on both computers. Thanks for all the help> I am learning alot.
 
netstat -a will list all processes using network ports. You can identify running or conflicting processes that are trying to access the port you want to use.

Apache may be running as a service. Thus when you try to start in console it reports port in use.

If it is running as a service type 'net stop apache' to stop it, net start apache to start it. You can also manage services by typing services.msc at a command prompt.

Typing net start with no arguments will list running services.

glad I could help

\0
 
NullTerminator, I really am sorry but I don't understand what you mean by "running as a service" but the tray icon says all services are running. Okay the services menu says apache is running as a service that it starts automatically so that means I can't start in console because Apache already has port 8080 tied up right?
 
Services start when the machine boots, before any user logs in. This is necessary in a true 'server' role. If apache were not running as a service and you start from a console session, when you log off apache would die. Services will keep running even when no one is logged in to the machine.

For development you may want to 'disable' the Apache service (right click on the service and view properties, ont the 'General Tab,' select disabled from "Startup Type" ) Then you can stop and start Apache at will from the console.

Other wise from the console use 'net stop / net start' commands to control apache.

Have fun....

Jeb Beasley, the NullTerminator
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top