HOW TO INSTALL OWNCLOUD ON WINDOWS SERVER 2012 WITH SSL

Thanks to: http://www.cloudservers.com


we will provide a complete walkthrough on how to install ownCloud on your Windows Server 2012 Cloud VPS. This guide will assume you have configured IIS, MySQL, PHP along with PHP Manager in IIS, that there are no pending reboots and you are ready to install ownCloud.
If you need assistance setting up IIS, PHP (and PHP Manager in IIS), and MySQL, on Windows Server 2012 see our complete walkthrough guide here.
First, we will download ownCloud from their site. You can visit the download page here:
http://owncloud.org/install/
For your convenience, the latest version direct download is here:
http://download.owncloud.org/community/owncloud-6.0.0a.zip
Once your download completes, extract the entire contents of the zip file to the “c:\inetpub\wwwroot” folder. The result being, there is now a folder here, “c:\inetpub\wwwroot\ownCloud” that contains all of the ownCloud files.
2013-12-18_15-59-46
In the new ownCloud directory just created, you will need to move the “data” folder to another location as your data folder cannot live under the wwwroot folder. I chose to move mine to, “c:\ownCloud\data”.
Next, we will need to grant the IIS IUSR account Write rights to the following folder, and subfolders, “c:\inetpub\wwwroot\ownCloud”.
OwnCloud Install 2
Next, we will create a local user who we will use for the MySQL database. Launch Server Manager > Tools > Computer Management > Local Users and Groups > right-click Users > New user… I chose to name my user “ownclouduser”. Make sure to take note of this password, we will be using it for MySQL in the next step.
Now launch MySQL Command Line Client, by clicking Start > MySQL Command Line Client. Then enter in the following information:
mysql> create database owncloud;
mysql> CREATE USER ‘ownclouduser’@'localhost’ IDENTIFIED BY ‘password’;
mysql> GRANT ALL ON owncloud.* TO ‘ownclouduser’@'localhost’;
mysql> flush privileges;
mysql> exit;
SQL Server
12-20-2013 10-41-33 AM
Next, we need to make sure we have enabled the proper PHP extensions. There are two ways to do this:
1)Launch IIS Manager, navigate to your site in the left pane, and then select PHP Manager. Enable or Disable an Extension
2)Edit your php.ini file direct “c:\php\php.ini” and uncomment the proper extensions
Make sure that you have the following enabled:
php_curl.dll
php_gd2.dll
php_mbstring.dll
php_fileinfo.dll
php_mysql.dll
php_mysqli.dll
php_openssl.dll
php_pdo_mysql.dll
IIS 1
Next, we want to make some changes so that we can upload files larger than 20MB the default IIS upload limit. Again, there are two ways to update this for PHP
1)Launch PHP Manager in IIS, update the “post_max_size” and “upload_max_filesize” objects there.
2)Edit you php.ini file direct “c:\php\php.ini” and set the proper size you want. If you want 2GB to be the max, set 2G.
IIS 3
We also have to edit the default IIS size as well, this is done by launching “Request Filtering” and then clicking “Edit Feature Settings…” in the right pane. This value is set in bytes. The example below shows 2GB.
IIS 2
At this point, issue an IIS Reset and then launch the site:
http://localhost/owncloud
You should see the screen here:
launch ownCloud site
Create an admin user, it cannot match the mysql user’s password. Then enter in the MySQL information that we created earlier for owncloud.
Congrats, you’ve setup ownCloud on a Windows Server 2012 running IIS8, PHP, and MySQL! Now we need to setup SSL, so we can access and authenticate via HTTPS.
At this point, you’ve got a few options to generate a certificate to assign to your site:
1)Use IIS’s self-signed certificate
2)Use IIS6 Resource Kit Tools certificate generator or use openssl to configure a certificate for your server
3)Submit a CSR to a Certificate Authority, either public or within your organization
In this guide, I am assuming you are using a standalone server and aren’t planning to leverage a CA. Your best choice would be #2, to download the IIS6 Resource Kit Tools, only install sslself utility, and generate a proper self-signed cert. The self-signed certificate in IIS Manager is quite limited.
You can find the IIS6 Resource Kit Tools download here:
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=17275
During the installation, choose Custom, and un-select everything except for Self-SSL 1.0:
self-ssl
To launch the utility, click Start > SelfSSL (it should show up on the tiled interface). Run a command similar to the below example and screenshot:
selfssl.exe /T /N:CN=myserver.mydomain.com /K:4096 /V:3650
This creates a certificate that will be immediately trusted locally, identifies itself as the proper DNS name, sets key size at 4096 vs 1024 default self-signed, and will be valid for 10 years.
SSL 1c
Next, go back into IIS Manager, select the Default Site, right-click and select “Edit Bindings”. Click Add. Then choose https, 443, and then select the certificate you just created, it will be the full result of the CN= option.
SSL 1b
Next, I recommend restarting MySQL and then issue an IIS reset, just to ensure we have all the proper extensions running and everything is fresh after the configuration changes. Then access your site here and login:
https://localhost/owncloud
Then click your username in the top-right corner > Admin. Then scroll down and enforce HTTPS:
enforce HTTPS
This concludes our ownCloud installation guide for Windows Server 2012. You can find ownCloud’s official Windows documentation here:
http://doc.owncloud.org/server/6.0/admin_manual/installation/installation_windows.html

Comentarios

Entradas populares de este blog

Guía de herramientas básicas para estudiantes: 31 apps y webs imprescindibles para ayudarte con los estudios

Comando FOR para archivos BAT

How to Fix Failed to Connect a Hyper-V Standalone to Veeam Backup