How To Run Litecart On Iis

Titel

OldNew
11How To Run Litecart On Iis

Permalink

OldNew
11how_to_run_litecart_on_iis

Indhold

OldNew
1# How To Run LiteCart on IIS
12
3This article will guide you through how to install Microsoft Internet
4Information Services (IIS) and configure a new website running LiteCart.
5For this guide we assume that you have already installed [PHP for Windows](https://windows.php.net/download).
6
7## Install IIS
8
9If your machine isn't running IIS yet, you will need to install it.
10This is usually done in the "Turn Windows features on or off" dialog.
11
121. Click your Windows START-menu button.
13
142. Type "Enable or disable Windows Features"
15
163. Navigate to "Internet Information Services" and enable the
17following components:
18
19 * World Wide Web Services -> Application Development Features -> "CGI"
20 * World Wide Web Services -> Common HTTP Features -> Default Document
21 * World Wide Web Services -> Common HTTP Features -> HTTP Errors
22 * World Wide Web Services -> Common HTTP Features -> HTTP Redirection
23 * World Wide Web Services -> Common HTTP Features -> Static Content
24 * World Wide Web Services -> Performance Features -> Dynamic Content Compression
25 * World Wide Web Services -> Security -> Request Filtering
26
27![](windows_features_iis.png)
28
294. Click OK.
30
31## Create a local domain
32
33If you intend to run this locally here is how we can create a new domain
34used for local access:
35
361. Grab the Windows hosts file editor or
37open Notepad as an administrator and edit
38C:\Windows\System32\drivers\etc\hosts.
39
402. Create a new hostname e.g. *litecart.local* and assign it to the
41local machine *127.0.0.1*.
42
43## Configure IIS
44
451. Open IIS manager by right clicking Windows START-menu and selecting
46Computer Management.
47
482. Navigate to Services and Applications -> Internet Information
49Services.
50
513. Select (Local Computer) in the tree and double-click "Default
52Document". Add "index.php" to the list
53
544. Select (Local Computer) in the tree and double-click "MIME Types"
55and add extensions if missing:
56
57 * .woff font/woff
58 * .woff2 font/woff2
59 * .webp image/webp
60
61## Setup a new IIS website
62
63Rewritten URLs will turn
64**/index.php/**rubber-ducks-c-1/yellow-duck-p-1 into
65**/**rubber-ducks-c-1/yellow-duck-p-1. To enable this we need to
66make sure IIS has URL rewrite support installed and force enable
67detection in LiteCart.
68
691. Open IIS manager by right clicking Windows START-menu and selecting
70Computer Management.
71
722. Navigate to Services and Applications -> Internet Information
73Services.
74
753. Expand (Local Computer)
76
774. Expand "Sites".
78
795. Right-click Sites and select New -> Web Site.
80
816. Give this new site the name LiteCart and the domain we created
82litecart.local.
83
84![](new_site_iis.png)
85
867. Select the new site "LiteCart" and Double-click Handler Mappings.
87
888. Select Add Module Mapping to configure a handler for PHP files:
89
90![](php_handler_iis.png)
91
92## Enable Rewritten URLs
93
941. Install the [URL Rewrite](https://www.iis.net/downloads/microsoft/url-rewrite)
95Extension for IIS.
96
972. Open IIS manager by right clicking Windows START-menu and selecting
98Computer Management.
99
1003. Navigate to Services and Applications -> Internet Information
101Services.
102
1034. In the Connections tree select (Local Computer) -> Sites ->
104LiteCart.
105
1065. Double-click "URL Rewrite" -> Add Rule(s) -> Blank rule and
107enter the following:
108
109![](url_rewrite_iis.png)
110
1116. Also under "URL Rewrite" click "View Server Variables" and add
112the following:
113
114 MOD_REWRITE
115
1167. Install the add-on [Force Rewritten URLs](https://www.litecart.net/en/addons/236/force-rewritten-urls)
117
118## Note
119
120If you haven't already, install [PHP Manager](https://www.iis.net/downloads/community/2018/05/php-manager-150-for-iis-10)
121for IIS from here. Then you will see it in IIS Manager.

Edited by litecart on 29 dec. 2023 at 04:28