This documentation gives you the guidelines to install a Nuxeo instance on a Windows Server and use IIS as a frontal web server. This documentation is more focused on the IIS configuration. For more details about the installation of the Nuxeo Platform or IIS, please refer to the relevant documentation.
Requirements:
- Windows 2008 or greater
- Java 8 or above (for Nuxeo 7.10 and later versions)
- IIS 7 or above with ASP.NET role service enabled,
- Nuxeo 7.10 or later version installed.
Configuration
Nuxeo Installation
- Check Java is correctly installed.
- Download the Nuxeo Windows distribution (.exe).
- Install the Nuxeo Platform.
- Start the Nuxeo instance.
- Open the Browser from the Windows Server (firewalls must be configured so as to allow this) at the address
http://NUXEO_SERVER/nuxeo
. - Configure the server: In General Settings, replace IP Address 0.0.0.0 by 127.0.0.1 to limit Tomcat to local answers.
Enabling Web Server (IIS)
- Connect as Administrator on the Windows Server.
- In the Server Manager, click on Add Roles and Features.
- Select Web Server (IIS).
- Leave the default configuration and validate.
Activating the Application Request Routing Addon
- Download the "Application Request Routing" addon.
Run the command:
net stop was /y
It might not be started, so ignore errors here.
Run the command:
net stop wmsvc /y
It might not be started, so ignore errors here.
Execute the downloaded .exe file and accept the default configuration.
- Check that Windows Service Pack is up-to-date (Start > Settings > Control Panel > Automatic Updates).
- Also check the requirements (Windows version, etc.).
Configuring IIS
Enabling the Rewrite Feature
- Go into the Administration Tools panel.
- Open Internet Information Service (IIS) Manager.
- Select the local server node on the left panel.
- Click on "Application Request Routing" and open the feature.
Edit the server proxy settings:
- Check the "Enable Proxy" box.
- Leave the default values.
- Save the configuration.
Adding the Rewrite Rule
- In Internet Information Service (IIS) Manager, select a server node on the left panel.
- Open URL Rewrite.
- Click on Add a rule(s)….
- Select Inbound rule > Blank rule. In the following steps, if a field is not specified, leave the default value.
In Match URL:
- Name: Nuxeo Inbound
- Request URL: Match the pattern
- Pattern:
(nuxeo.*)
In Server Variables:
- Server Variable Name:
HTTP_NUXEO_VIRTUAL_HOST
- Value:
{HTTP_HOST}
- Check the box.
- Server Variable Name:
In Action:
- Action type: Rewrite
http://127.0.0.1:8080/{R:1}
If your Nuxeo server is not hosted by the IIS server, replace 127.0.0.1 by the internal IP address of the Nuxeo server. Of course, IIS server must reach this internal IP Address.
Preserving the Host Header
We've had report that the following is needed as well:
appcmd.exe set config -section:system.webServer/proxy -preserveHostHeader:true
Enhancing the URL MAX Length Parameter
Windows Web Server defines a default limit for URL parameters. This limit is set to 256 characters. In Nuxeo, parameter length can be greater than this default value.
- Open the Window registry: Command + R, and type
regedit
. - Open
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
. Right-click on Parameters > New > DWORD.
- Name:
UrlSegmentMaxLength
- Value: 2048
- Base: Decimal
- Name:
- Restart the server.
Testing Your Configuration
We suggest to use a client desktop with Firefox and its development tools.
- Open Firefox and hit the
<F12>
key. This action opens the Firefox development tools console. - Click on the Network section.
- Go to http://iis.servername/nuxeo, where
iis.servername
is the name of the server the client can reach. - Connect as
Administrator
to Nuxeo. Each line displayed in the network console is a request made by the browser. - Check that each line points to the
iis.servername
and not the 127.0.0.1 address without error.
If you have errors, please check the next section.
Typical Errors
Error 1
502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.
In the rule you defined the target as http://internal.address.ip:8080. This error might occur because the server cannot reach this address.
Error 2
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
This error means you made a mistake during the rule configuration and about the server variable name.
Error 3
If Nuxeo has a strange behavior, for instance:
- you can't write in a text field,
- every time you try to type something into a text field, the focus changes to the search field,
- the Home Dashboard is empty
- etc…
These problems may occur because you didn't enhance the URL MAX Length parameter.
You can look into Firefox development tools network console if some requests returned a HTTP 401 status, with a "bad url" message.