dongxingqiu7943 2016-01-27 01:03
浏览 31

激活IIS和PHP

I am looking to create a powershell script or a batch file that can turn on IIS and 'active' php (add the proper environment variable [path will be where script is run from]). I looked around and saw things like pkgmgr, however its been depreciated, I need the script to run on computers ranging from Server 03 -> Server 12 and standard boxes like Vista -> Win10.

Which is the best way to achieve this and is there a way to have 1 script run on all boxes or do you need OS checks in the script/different scripts?

  • 写回答

1条回答 默认 最新

  • dslfjrmz70457 2017-06-18 05:33
    关注

    IIS and Apache should have different port.

    To change the port of Apache(WAMP)

    Click on WAMP icon that you can see on your tray or other shortcut icons for wamp.

    Look for the Apache and open the httpd.conf or if you know where it is stored.

    Find the "80" then change

    Listen 80 to Listen 8080

    ServerName localhost:80 to ServerName localhost:8080

    Note: You can change the port which you desired as long as it will not conflict with your other port. It is more safe and common if the port is at this range.

    Then click on Restart All Services.

    To change the port of Apache(XAMPP)

    1. Open file \xampp\apache\conf\httpd.conf

    search following line(at 47 in default installation):

    Listen 80

    change the port 80 to another say 8080 as shown below:

    Listen 8080

    Also search following line(at 181 in default installation)

    ServerName localhost:80

    and change port 80 to 8080 as shown below:

    ServerName localhost:8080

    1. Open \xampp\apache\conf\extra\httpd-ssl.conf file.

    search for "Listen 443" and change to "Listen 449"

    search for "" and change to ""

    search for "ServerName localhost:443" and change to "ServerName localhost:449"

    1. Start the "setup_xampp.bat" and beginning the installation.

    2. Double click on xampp_start.exe. It will start XAMPP.

    Note: Do NOT close console window if it is not closed automatically. Keep it opened.

    1. Start your browser and type http://127.0.0.1:8080 or http://localhost:8080 in the location bar. You will see XAMPP start page.

    Now, you can work with both IIS and Apache servers.

    评论

报告相同问题?

悬赏问题

  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大