Forum Moderators: phranque

Message Too Old, No Replies

Apache VS IIS interference doubt

i wanna use both - help

         

sandhyasukumar

8:47 am on Sep 18, 2005 (gmt 0)

10+ Year Member




hi evrybody
iam a new learner in this CGI prograaming world.

recently i have been working on .NET and so i had IIS installed.

i use win xp, so i installed APACHE 2.0.54 .

i dint know that o had to stop IIS , so when i typed localhost, i wud get IIS page.

finally i changed and DISABLED IIS 5.1 services,
but i havent removed it.

then to , APACHE isnt working, i mean the browser doesnt display the contents of APACHE page when i type [localhost...]

help needed, i have to use both IIS Aand APACHE cos iam recently working on both .NET and APACHE .

thanking u
sandhya.s
final year B.E student - IS

sandhyasukumar

9:03 am on Sep 18, 2005 (gmt 0)

10+ Year Member



i thought i can include some more information...

this is the contents of my install notepad -> inside the logs directory . (D:/APACHE GROUP/Apache2/logs
after APACHE installation ...

**************************************************
Installing Apache HTTP 2.0 server with
DomainName = localhost
ServerName = localhost
ServerAdmin = email@isp.co.in
ServerPort = 80
ServerRoot = D:/APACHE GROUP/Apache2
Rewrote D:/APACHE GROUP/Apache2/conf/httpd-win.conf
to D:/APACHE GROUP/Apache2/conf/httpd.default.conf
Successfully removed D:\APACHE GROUP\Apache2\conf\httpd-win.conf
Duplicated D:/APACHE GROUP/Apache2/conf/httpd.default.conf
to D:/APACHE GROUP/Apache2/conf/httpd.conf
Duplicated D:/APACHE GROUP/Apache2/conf/ssl.default.conf
to D:/APACHE GROUP/Apache2/conf/ssl.conf
Duplicated D:/APACHE GROUP/Apache2/conf/magic.default
to D:/APACHE GROUP/Apache2/conf/magic
Duplicated D:/APACHE GROUP/Apache2/conf/mime.types.default
to D:/APACHE GROUP/Apache2/conf/mime.types
Successfully removed D:\APACHE GROUP\Apache2\conf\InstallConf.awk

********************************************

whats wrong?
can anybody help me out.

thanking u
sandhya.s

[edited by: jdMorgan at 2:27 pm (utc) on Sep. 19, 2005]
[edit reason] Obscured e-mail. [/edit]

jdMorgan

4:31 pm on Sep 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



sandhya,

> then to , APACHE isnt working, i mean the browser doesnt display the contents of APACHE page when i type [localhost...]

What *do* you get? - An error page, a timeout, a DNS error?

Jim

sandhyasukumar

5:12 pm on Sep 18, 2005 (gmt 0)

10+ Year Member



hi

when i type [localhost...]
in the browser , i get the message "this page cannot be displayed"

and in the start->programs->apachecontrols-> start, stop or restart

whichever action of the above 3 i do ,

it opens up a command propmt screen and displays :
" the following file cannot be found,
service apache2 cannot be found. "

but when i click apache monitor servers

it says "apache monitor already started"

any idea?
thanking u
sandhya.s

jdMorgan

3:51 am on Sep 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you, at any time since you started this project, reinstalled Apache without uninstalling Apache and completely (manually) removing all previously-installed Apache directories? It sounds like you may have two instances --or a complete instance and a partial instance-- of Apache installed.

Hopefully, as more people show up for the workweek over the next 24 hours, we'll get some more expertise in here to help.

Jim

pnllan

7:44 am on Sep 19, 2005 (gmt 0)

10+ Year Member



First, realize that both IIS and Apache by default are trying to serve on Port 80. Which ever (IIS or Apache) happens to grab Port 80 will knock the other out.

I too, have the need to run more than one web server on my system. I configure both IIS, Apache1, and Apache2 to Start Manually in the Services MSC [Control Panel ¦ Adminstrative Tools ¦ Services]. This way I do not have to worry about stopping one or the other.

Consider configuring one to use a different Port. Say IIS could be on Port 80 and Apache could be on 8080. In this case, to access Apache on your LOCALHOST you would enter this:

[localhost:8080...]

You can further troubleshoot "file not found" by reviewing your ERROR.LOG. In addtion, the XP Event Viewer will sometimes trap errors with useful information.
~

sandhyasukumar

4:30 pm on Sep 19, 2005 (gmt 0)

10+ Year Member



hi everybody

after going thru the suggestions of u all.

i have done the following actions:

since i need to use both IIS and APACHE2

i have done the following .

jdmorgan ->>> hi, ur guess is ryt , i had installed it twice and i guess the first deinstallation process wasnt done sucessfully, and 2 instances were running.

pnllan-> hi, I was thinking the same, and yes the IIS was also running in port80 .

after considering the suggestions of u both i have done the following:

1>completely deinstalled APACHE2.
2>installed it again ,
under the port8080 now , it said have to start it manually.
3> i configured the Apache httpd.conf Configuration file .
4>when i do test configuration the console screen just appears for a second and vanishes.
i am not able to make out whether there was a msg .

5> and int the start->programs->apache2->servercontrols
only 2 options show up now i.e apache monitor services and start apache in console.

my doubt:

iam not able to find the service of apache2 in the [Control Panel ¦ Adminstrative Tools ¦ Services] ,
so that i can start it.

i even tried [localhost:8080...]

Am i wrong anywhere?

how do i start APACHE2 service now, cos i think i have installed now in port 8080 with an option of starting it manually.

please help.
its an emergency.

sandhya.s

sandhyasukumar

4:35 pm on Sep 19, 2005 (gmt 0)

10+ Year Member



hi its me again

i found this in my error log notepad of apache2 , guess it myt help u out to figure out whats wrong.

***************************************************
[Mon Sep 19 20:54:53 2005] [notice] Apache/2.0.54 (Win32) configured -- resuming normal operations
[Mon Sep 19 20:54:53 2005] [notice] Server built: Apr 16 2005 14:25:31
[Mon Sep 19 20:54:53 2005] [notice] Parent: Created child process 3128
[Mon Sep 19 20:54:53 2005] [notice] Child 3128: Child process is running
[Mon Sep 19 20:54:53 2005] [notice] Child 3128: Acquired the start mutex.
[Mon Sep 19 20:54:53 2005] [notice] Child 3128: Starting 250 worker threads.
[Mon Sep 19 20:55:02 2005] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Sep 19 20:55:02 2005] [notice] Child 3128: Exit event signaled. Child process is ending.
[Mon Sep 19 20:55:03 2005] [notice] Child 3128: Released the start mutex
[Mon Sep 19 20:55:04 2005] [notice] Child 3128: Waiting for 250 worker threads to exit.
[Mon Sep 19 20:55:04 2005] [notice] Child 3128: All worker threads have exited.
[Mon Sep 19 20:55:04 2005] [notice] Child 3128: Child process is exiting
[Mon Sep 19 20:55:04 2005] [notice] Parent: Child process exited successfully.
[Mon Sep 19 21:24:36 2005] [notice] Apache/2.0.54 (Win32) configured -- resuming normal operations
[Mon Sep 19 21:24:36 2005] [notice] Server built: Apr 16 2005 14:25:31
[Mon Sep 19 21:24:36 2005] [notice] Parent: Created child process 432
[Mon Sep 19 21:24:36 2005] [notice] Child 432: Child process is running
[Mon Sep 19 21:24:36 2005] [notice] Child 432: Acquired the start mutex.
[Mon Sep 19 21:24:36 2005] [notice] Child 432: Starting 250 worker threads.
[Mon Sep 19 21:24:49 2005] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Sep 19 21:24:49 2005] [notice] Child 432: Exit event signaled. Child process is ending.
[Mon Sep 19 21:24:50 2005] [notice] Child 432: Released the start mutex
[Mon Sep 19 21:24:51 2005] [notice] Child 432: Waiting for 250 worker threads to exit.
[Mon Sep 19 21:24:51 2005] [notice] Child 432: All worker threads have exited.
[Mon Sep 19 21:24:51 2005] [notice] Child 432: Child process is exiting
[Mon Sep 19 21:24:51 2005] [notice] Parent: Child process exited successfully.

***************************************************

thanking u all
sandhya.s

pnllan

8:51 pm on Sep 19, 2005 (gmt 0)

10+ Year Member



Per your Control Panel issue:

I use XP Control Panel as a Menu, so if you use the Default for XP then it would be [Perfomance and Maintenance ¦ Administrative Tools ¦ Services].

Services can also be accessed by doing a START ¦ Run and typing 'services.msc' in the OPEN pull-down, then click OK or just hit your ENTER key.

You should have a good idea of where you need to go for SERVICES now. So let's tackle a different issue now.

4>when i do test configuration the console screen just appears for a second and vanishes...

From the way I see you trying to start Apache, this actually makes sense. The shortcut that is provided is basically a shell command to start the apache application. Nothing more. So after it disappears it might actually be working, but since you cannot browse to 'localhost:8080' - most likely not. This tells me that something is wrong in the HTTPD.CONF file. I've been here too.

So, you are going to hate hearing this, but uninstall Apache one more time...please. This will be the simplest way to get you to where you want to be, and should only take 20 minutes at the most). After you uninstall, restart the OS (this is to make sure there are no residuals in memory).

Now for install time, what I'm going to write might look a little weird, but do it anyway.
1. INSTALL Apache 2.x.xx, on the SERVER INFORMATION dialog box of the INSTALL use the following:
Network Domain - localhost
Server Name - localhost
Admin Email - Whatever
INSTALL "for ALL Users, on Port 80, as a Service - Recommended" (you will changes this later using the HTTPD.CONF)

2. After the install, restart the PC regardless of whether prompted or not. Once the system reboots, you will NOTICE A NEW ICON in your "systray" (down in the clock area). That new icon should look like a red feather, and can be RIGHT-CLICKED as well as LEFT-CLICKED. Both are very friendly, right-click gives access the SERVICES and the Apache Monitor; left-click give you a list of your Apache Servers on the system and allow command access to START, STOP, or RESTART. At this time you want to check your localhost on a browser. With default configuration, you should see a Success Page. If so, STOP Apache for further configuration (you should notice an icon change in the Apache Monitor -systray).

3. So that Apache starts and stops when you want, go to SERVICES. Find Apache2 in the Service List. Double Click Apache2 , and a dialog box is opend. IN the middle, you should see STARTUP TYPE, and this will be currently set to AUTOMATIC. CHANGE THIS TO MANUAL. Restart your system once more, this is to check that Apache DOES NOT AUTOMATICALLY start, but the Apache Monitor is still in the SYSTRAY.

4. If all is well at this point, now configure Apache via the HTTPD.CONF. IN PARTICULAR, you want to make the PORT CHANGE, from 80 to 8080 (or whatever open Port you have or want to use). This is accomplished by changing the SERVER NAME directive from:

ServerName localhost:80

to

ServerName localhost:8080

Once this change has been saved, try starting Apache via the Apache Monitor in your systray. If Apache STARTS without error continue by STOPPING apache, and finish your CONFIGURATION to whatever you need.
~

sandhyasukumar

2:29 am on Sep 20, 2005 (gmt 0)

10+ Year Member



hi pnllan

thanx a lot, its working now, i guess restarting the system now and then after small configuration changes are very much necessary.

ok i have a small issue again ,
i did the following:

1. uninstalled and reinstalled again
with port80 itself,
it worked.

later as u said in the httpd.congiuration file
i changed servername localhost :8080

then too , when i type [localhost...] only it opens up the sucessfull apache page.

and since i wanted to use IIS also , i opened up the services and made startup type = manual for IIS too.

now both IIS and APACHE2 works properly by starting one at a time , and stopping the other when one is being used.

i mean both is using port80 now.

pnllan -> even though i changed the servername localhost:8080 it still using port 80.
shud i change it back to port80 . will it affect my CGI programs?

any solution for this.

thanx a lot again , ryt now i will be using any one at a time not both simultaneously so its not a prob ryt now.

but if u can figure out a way to run one on port80 and the other on port8080 . let me know

pnllan

4:24 am on Sep 20, 2005 (gmt 0)

10+ Year Member



Actually, if you are running the web servers the way you say you intend, then STOP Apache (check to see if it's running or not) if necessary. Edit the CONF file, such that Apache uses Port 80. Then, START Apache. My bad...I was trying to get three things done at once.

Also, REMEMBER - with Apache, any time you change the CONF file - STOP then START Apache, otherwise changes will not take effect.

For those out there who like to perform configuration changes shall we say - regularly. Make notes of what you're changing and/or make back-ups of your CONF file. Also, if you are working on things like Virtual Host, PHP, Perl, SSL, Alias, or the likes; ONLY makes changes in one of those areas at a time. This way, you are less likely to get your CONF file 'hosed up'. First rule of troubleshooting - know where you've been.

For Windows Users - Since, the Apache Group decided to use the MSI install format, it makes since to let the WIS (Windows Installer Service) (via MSI) perform the necessary Registry Entries for the Apache Service. The extra rebooting is to ensure that ALL memory (Virtual and Physical) is released before continuing.

Experience is just the result of what many times is a cruel lesson we inflict on ourselves, as I am sure you can attest.
~

pnllan

4:54 am on Sep 20, 2005 (gmt 0)

10+ Year Member



If you want to run both (not recommended but possible) then you would want to make sure that the Directives ServerName and Listen are both on the same PORT.

Example:

Listen 8080
...
...
ServerName localhost:8080
...
...

I failed to mention the LISTEN Directive in previous post.