Apache and IIS 7 running together

前端 未结 5 1935
陌清茗
陌清茗 2020-12-30 04:05

I am working on windows 7. IIS 7 and XAMPP are installed on the same computer. I have been playing with win host file and apache configuration files into to understand Serv

相关标签:
5条回答
  • 2020-12-30 04:24

    I have faced the same problem. However I have solved this way. I got it from here, it was really effective for me when all solutions were unable to provide me absolute solution.

    1. Go to Control Panel > Administrative Tools > Click Services
    2. Find “World Wide Web Publishing Service”
    3. Right click and select “Stop”
    4. Right click and select “Properties”, then change “Startup type” to “Manual”

    If this doesn’t fix it, you can find out what is using port 80 as follows:

    In a Command Prompt, run ‘netstat -ao > netstat.txt’ to write active connections and associated process IDs (PID) to a file (for me, there were too many to just view them in the command prompt) Find the PID that is listening on port 80 (0.0.0.0:80) – for me, the PID was 4, which seems quite common Open Task Manager (Ctrl + Shift + Esc), right click on the column headers, and then click PID to show the PID column. Sort by PID to find the process for the PID that you identified above. Once you know the process that is causing the problem, a bit of Googling (other search providers are available) should help you fix it.

    0 讨论(0)
  • 2020-12-30 04:27

    It is possible to run both IIS and XAMPP on same machine by just changing the port number which is used by XAMPP server. Read this article to know how to change port number:

    http://www.gooshareit.com/2012/03/how-to-run-iis-and-xampp-together-on.html

    0 讨论(0)
  • 2020-12-30 04:36

    It is doable. The thing to keep in mind is that no 2 services can share the same port and IP address. Unfortunately, IIS takes over port 80 completely on the magic 0.0.0.0 address. What you need to do is re-bind apache and IIS to different IP addresses as well as remove the 0.0.0.0 binding. Not exactly sure how to get there on IIS7 (presuming you are running it given IE9 in the screenies), last time I pulled this stunt IIS6 was hawt.

    A more sane option would be to setup a reverse proxy on 80 and have it hand stuff out to different web servers based on whatever rational criteria you want to use.

    EDIT: found the magic juju, IIS7 post #44 - IIS7 and Apache on the same machine.

    0 讨论(0)
  • 2020-12-30 04:37

    How To Run IIS And XAMPP Together On Same Machine

    It is possible to run both IIS and XAMPP servers together on same machine by just changing the port number of any one of the server's. XAMPP-Apache and IIS both the server's uses the same port 80 to connect. In this post i am going to show you how to change the port number for the XAMPP-Apache server. Changing the port number for Apache server allows you to run both IIS and XAMPP server's on same machine using different port's.

    Firstly, You need to know the folder where XAMPP is installed (root folder). The default folder is c:\xampp. From the root folder navigate to " apache\conf " folder and find the file "httpd.conf".

    Before editing the file, make a backup of it with a name "httpd.conf.bak" so that if something goes wrong you can replace this file. Now open the file "httpd.conf" with an editor like notepad. You need to make two edits to the file.

    The first one:

    Find out the below lines in the file.

    #Listen 0.0.0.0:80
    #Listen [::]:80
    Listen 80
    

    change it as shown below:

    #Listen 0.0.0.0:80
    #Listen [::]:80
    Listen 8080
    

    The second edit:

    Find the below line:

    ServerName localhost:80
    

    change it to:

    ServerName localhost:8080
    

    You have finished changing the port number. Now restart your apache server from the xampp control panel and its ready to run.

    Open your browser and and enter the address localhost:8080. You can see the root folder of apache opened. There is no need to make any changes to the IIS server and you an access it by just entering the address localhost in your browser.

    In the above screenshot you can see the IIS server being accessed through localhost and XAMPP server through localhost:8080 on the same machine and even the same browser at a time.

    0 讨论(0)
  • 2020-12-30 04:45

    In case of trying to get XAMPP (Apache) and IIS (5.1) working on WinXP this is what I did:

    C:\xampp\apache\conf\httpd.conf: Search for “Listen 80″, change to “Listen 8080″ Search for “ServerName localhost:80″, change to “ServerName localhost:8080″

    C:\xampp\apache\conf\extra\httpd-ssl.conf Search for “Listen 443″, change to “Listen 4499″ Search for “”, change to “” Search for “ServerName localhost:443″, change to “ServerName localhost:4499″

    [Then, access your Apache side by running localhost:8080 and ISS side by simple loccalhost]

    0 讨论(0)
提交回复
热议问题