Question

I figured the easiest thing to do was to just change the port number that Apache listens to, but I still can't get it to start back up after installing IIS. My IIS currently serves up pages correctly at http://localhost:80. I have several PHP projects, and here are the basics of how ports are configured in my httpd.conf:

Listen 81

# Begin listening for virtual hosts.

NameVirtualHost *:81

<VirtualHost *:81>

# virtual.myvirtualdomain.com virtual host.

ServerAdmin webmaster@virtual.myvirtualdomain.com
DocumentRoot "c:/Development/HTTPServer_WWW/virtual.myvirtualdomain.com/www"
ServerName virtual.myvirtualdomain.com
ErrorLog "c:/Development/HTTPServer_WWW/virtual.myvirtualdomain.com/logs/log"

<Directory "c:/Development/HTTPServer_WWW/virtual.myvirtualdomain.com/www">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

</VirtualHost>

Then in my Windows hosts file I have an entry like this:

127.0.0.1 virtual.myvirtualdomain.com

I have several of these virtual domains setup, all running locally for numerous PHP projects I'm working on currently. This was all working correctly on port 80, but then I installed IIS 5.1, and the service no longer starts up. I did some research, and they can't both be running on the same port. I changed it so Apache looks to port 81 now, but it still will not start.

EDIT:

So, I uninstalled IIS, and now I can't get Apache HTTP Server to startup at all still. I changed all of the settings back to port 80, and it is still failing.

Was it helpful?

Solution 2

I did what Haarsma suggested, and it turns out that I had removed a virtual directory, and so Apache couldn't find it (thus not starting). Apparently it had nothing to do with the ports at all, and was my dumb mistake. I reinstalled IIS, changed my config for Apache to listen on port 81, and it works!

OTHER TIPS

Stop the service, then run Apache from the command line. It will show you the errors occuring during start up.

  • Stop the iis server and see if apache starts.
  • In command line, run:

    netstat -ano

this will tell you which process ID runs on which port.

  • Disable windows firewall

It's very strange! I have IIS 6.0 and Apache 2.2 working together correctly on my Windows Server 2003. IIS on port 80, Apache on port 8081, both services set to run automatically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top