Configure Office Web Apps for SharePoint 2013

copied from: https://technet.microsoft.com/en-us/library/ff431687.aspx

Configure SharePoint 2013 to use Office Web Apps Server

Choose one of the following sections depending on whether you want to use HTTP or HTTPS. HTTP is generally recommended only for test environments. In production environments, the more secure HTTPS protocol is the better choice.

In a test environment that uses HTTP

For this configuration, make sure you have set up Office Web Apps Server by following the steps in Deploy a single-server Office Web Apps Server farm in a test environment. Be sure to configure the Office Web Apps Server farm to use an internal URL and HTTP. TheVideo: Configure Office Web Apps for SharePoint 2013 shows how to set up Office Web Apps Server and configure SharePoint 2013 to use Office Web Apps Server in a test environment.

Step 1: Open an elevated SharePoint 2013 Management Shell

Choose the procedure that corresponds to your server operating system.
In Windows Server 2008 R2
  1. Click Start > All Programs > Microsoft SharePoint 2013 Products.
  2. Right-click SharePoint 2013 Management Shell, and click Run as administrator.
In Windows Server 2012
  1. Press the Windows logo key + Q, or swipe in from the edge of the screen to show the charms, and then click Search to see all the applications that are installed on the computer.
  2. Right-click SharePoint 2013 Management Shell to display the app bar.
  3. In the app bar, click Run as administrator.

Step 2: Create the binding between SharePoint 2013 and Office Web Apps Server

Run the following command, where <WacServerName> is the fully qualified domain name (FQDN) of the URL that you set for the internal URL. This is the point of entry for Office Web Apps Server traffic. For this test environment, you need to specify the –AllowHTTP parameter to allow SharePoint 2013 to receive discovery information from the Office Web Apps Server farm by using HTTP. If you don’t specify –AllowHTTP, SharePoint 2013 will try to use HTTPS to communicate with the Office Web Apps Server farm, and this command won’t work.
New-SPWOPIBinding -ServerName <WacServerName> -AllowHTTP
After running this command, you should see a list of bindings displayed at the Windows PowerShell command prompt.
Need help? See New-SPWOPIBinding.

Step 3: View the WOPI zones for the SharePoint bindings

Office Web Apps Server uses zones to determine which URL (internal or external) and which protocol (HTTP or HTTPS) to use when it communicates with the host, in this case, SharePoint 2013. By default, SharePoint Server 2013 uses the internal-https zone. Run the following command to see what your current zone is.
Get-SPWOPIZone
The WOPI zone displayed by this command should be internal-http. If it’s displayed correctly, skip to step 5. If it isn’t, see the next step.
Need help? See Get-SPWOPIZone.

Step 4: Change the WOPI zone to internal-http

If the result from Step 3 was internal-https, run the following command to change the zone to internal-http. You need to make this change because the zone of SharePoint 2013 must match the zone of the Office Web Apps Server farm.
Set-SPWOPIZone -zone "internal-http"
Verify that the new zone is internal-http by running Get-SPWOPIZone again.
Need help? See Set-SPWOPIZone and Get-SPWOPIZone.

Step 5: Change the AllowOAuthOverHttp setting in SharePoint 2013 to True

To use Office Web Apps with SharePoint 2013 over HTTP in a test environment, you need to set AllowOAuthOverHttp to True. Otherwise Office Web Apps won’t work. You can check the current status by running the following example.
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
If this command returns False, run the following commands to set this to True.
$config = (Get-SPSecurityTokenServiceConfig)
$config.AllowOAuthOverHttp = $true
$config.Update()
Run the following command again to verify that the AllowOAuthOverHttp setting is now set to True.
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp

Step 6: Verify that Office Web Apps is working

In SharePoint 2013, make sure you’re not logged on as System Account because you won’t be able to edit or view the documents with Office Web Apps. Go to a SharePoint 2013 document library that contains Office documents and view a Word, PowerPoint, Excel, or OneNote file. The document should open in a browser that displays the file by using Office Web Apps.

In a production environment that uses HTTPS

Before you start the following procedures, make sure that you have set up Office Web Apps Server by following the steps in Deploy a single-server Office Web Apps Server farm that uses HTTPS or Deploy a multi-server, load-balanced Office Web Apps Server farm that uses HTTPS.

Step 1: Open the SharePoint 2013 Management Shell

Choose the procedure that corresponds to your server operating system.
In Windows Server 2008 R2
  1. Select Start > All Programs > Microsoft SharePoint 2013 Products.
  2. Right-click SharePoint 2013 Management Shell to display the shortcut menu, and click Run as administrator.
In Windows Server 2012
  1. Press the Windows logo key + Q, or swipe in from the edge of the screen to show the charms and then click Search to see all the applications that are installed on the computer.
  2. Right-click SharePoint 2013 Management Shell to display the app bar.
  3. In the app bar, click Run as administrator.

Step 2: Create the binding between SharePoint 2013 and Office Web Apps Server

Run the following command, where <WacServerName> is the fully qualified domain name (FQDN) of the URL that you set for the internal URL. This is the point of entry for Office Web Apps Server traffic.
New-SPWOPIBinding -ServerName <WacServerName> 
Need help? See New-SPWOPIBinding.

Step 3: View the WOPI zone of SharePoint 2013

Office Web Apps Server uses zones to determine which URL (internal or external) and which protocol (HTTP or HTTPS) to use when it communicates with the host, which in this case is SharePoint 2013. By default, SharePoint Server 2013 uses the internal-https zone. Verify that this is the current zone by running the following command.
Get-SPWOPIZone
Take note of the WOPI zone that is displayed.
Need help? See Get-SPWOPIZone.

Step 4: Change the WOPI zone if necessary

Depending on your environment, you might have to change the WOPI zone. If you have a SharePoint farm that's both internal and external, specify external. If you have a SharePoint farm that's internal only, specify internal.
If the results from Step 3 show that internal-https and the SharePoint farm is internal only, you can skip this step. If you have a SharePoint farm that’s internal and external, you need to run the following command to change the zone to external-https.
Set-SPWOPIZone -zone "external-https"
Need help? See Set-SPWOPIZone.

Step 5: Verify that Office Web Apps is working

In SharePoint 2013, make sure you aren’t logged on as System Account because you won’t be able to edit or view the documents with Office Web Apps. Go to a SharePoint 2013 document library that contains Office documents and view a Word, PowerPoint, Excel, or OneNote file. The document should open in a browser that displays the file by using Office Web Apps.

Comments

Popular posts from this blog

Configure SharePoint Server to use Office Online Server

PowerShell command to import Module and Get-ADUser