Rev 353 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
348 | daniel-mar | 1 | |
2 | Install OIDplus to Microsoft IIS |
||
3 | ================================ |
||
4 | |||
5 | (1) Install IIS using "Programs and Features" in the control panel |
||
349 | daniel-mar | 6 | ( Source: https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-1-install-iis-and-php ) |
7 | |||
8 | Install on a Windows Client (Windows 7/8/10 etc.): |
||
9 | At the command promt, run appwiz.cpl |
||
10 | Click Turn Windows features on or off. |
||
11 | In the Windows Features dialog box, click Internet Information Services, note the preselected features that are installed by default, and then select CGI. This selection also installs FastCGI, which is recommended for PHP applications. |
||
12 | Click OK. |
||
13 | To verify that IIS installed successfully, type the following into a web browser: http://localhost |
||
14 | You see the default IIS Welcome page. |
||
15 | |||
16 | Install on a Windows Server: |
||
17 | Open the Window Server Manager |
||
18 | In Server Manager, select Dashboard, and click Add roles and features. |
||
19 | In the Add Roles and Features Wizard, on the Before You Begin page, click Next. |
||
20 | On the Select Installation Type page, select Role-based or Feature-based Installation and click Next |
||
21 | On the Select Destination Server page, select Select a server from the server pool, select your server, and click Next. |
||
22 | On the Select Server Roles page, select Web Server (IIS), and then click Next. |
||
23 | On the Select Features page, note the preselected features that are installed by default, and then select CGI. This selection also installs FastCGI, which is recommended for PHP applications. |
||
24 | Click Next. |
||
25 | On the Web Server Role (IIS) page, click Next. |
||
26 | On the Select Role Services page, note the preselected role services that are installed by default, and then click Next. |
||
27 | Note: You only have to install the IIS 8 default role services for a static-content web server. |
||
28 | On the Confirm Installation Selections page, confirm your selections, and then click Install. |
||
29 | On the Installation Progress page, confirm that your installation of the Web Server (IIS) role and required role services completed successfully, and then click Close. |
||
30 | To verify that IIS installed successfully, type the following into a web browser: http://localhost |
||
31 | You should see the default IIS Welcome page. |
||
348 | daniel-mar | 32 | |
33 | (2) Install PHP using the Web Platform Installer |
||
349 | daniel-mar | 34 | Go to https://www.microsoft.com/web/downloads/platform.aspx |
35 | Click "Install this extension" to download the setup |
||
36 | Run WebPlatformInstaller_x64_en-US.msi |
||
37 | Accept the license aggreement |
||
38 | In the searchbox at the top right, enter "PHP" and press return |
||
39 | Select PHP 7.4 or similar |
||
348 | daniel-mar | 40 | |
353 | daniel-mar | 41 | Note: The Web Platform Installer sometimes exits with errors (signature verification failed etc), |
348 | daniel-mar | 42 | but you can ignore it, as PHP is actually successfully installed! |
43 | |||
44 | (3) Place OIDplus here: |
||
45 | |||
46 | C:\inetpub\wwwroot\oidplus\ |
||
47 | |||
353 | daniel-mar | 48 | (4) Open CMD as administrator and run following command to unlock various things in the web.config file: |
348 | daniel-mar | 49 | |
50 | %windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/security/authentication/anonymousAuthentication |
||
51 | |||
52 | (5) Solving problem "SSL Certificate Problem: Unable to get local issuer certificate" |
||
353 | daniel-mar | 53 | (e.g. prevents you from registering your system in the admin control panel): |
348 | daniel-mar | 54 | |
353 | daniel-mar | 55 | Download https://curl.haxx.se/ca/cacert.pem and place it in "C:\inetpub\" |
348 | daniel-mar | 56 | |
353 | daniel-mar | 57 | Edit "C:\Program Files (x86)\PHP\v7.4\php.ini" (you need to run Notepad as administrator) |
348 | daniel-mar | 58 | Search for "curl.cainfo" and change the line into: |
476 | daniel-mar | 59 | curl.cainfo=C:\inetpub\cacert.pem |
349 | daniel-mar | 60 | |
353 | daniel-mar | 61 | Attention: Placing the file in "C:\Program Files (x86)\PHP\v7.4\extras\ssl\" |
62 | sometimes causes a lot of problems because PHP has problems with the SysWOW64 replacement. |
||
63 | On some systems it works if "(x86)" is simply removed, but on other systems it |
||
64 | does not work at all. Instead, weird things happen like "MBstring not found" if |
||
65 | you set "curl.cainfo" to a wrong value (a bug in PHP?!) |
||
66 | So to be sure, use a different path, e.g. "C:\inetpub\" |
||
67 | |||
68 | If you want to double-check that everything works, try running |
||
69 | http://localhost/oidplus/dev/curl_https_check.php |
||
70 | (You need to move the file out of the "dev" directory, because it is secured from being accessed) |
||
71 | |||
72 | (6) Configure OpenSSL |
||
73 | |||
74 | Create the directory |
||
75 | C:\Program Files (x86)\Common Files\SSL |
||
76 | |||
77 | Copy the file |
||
78 | C:\Program Files (x86)\PHP\v7.4\extras\ssl\openssl.cnf |
||
79 | into the directory |
||
80 | C:\Program Files (x86)\Common Files\SSL |
||
81 | |||
82 | To see in which path PHP searches the openssl.cnf file, open |
||
83 | http://localhost/oidplus/dev/info.php |
||
84 | and look for the string "Openssl default config". |
||
85 | (You need to move the file out of the "dev" directory, because it is secured from being accessed) |
||
86 | |||
87 | If you want to double-check that everything works, try running |
||
88 | http://localhost/oidplus/dev/check_openssl_keygen.php |
||
89 | (You need to move the file out of the "dev" directory, because it is secured from being accessed) |
||
90 | |||
91 | (7) Open http://localhost/oidplus and follow the setup instructions |