HowTo: OwnCloud on a Windows Server 2008 R2 (IIS 7.5)

Tutorials on ownCloud administration
Forum rules
You may post your own tutorials here. Please keep in mind that a moderator has to approve it before everybody can read it!

Re: HowTo: OwnCloud on a Windows Server 2008 R2 (IIS 7.5)

Postby raydiation » Thu Mar 14, 2013 11:48 pm

What about putting this into the docs http://doc.owncloud.org/server/5.0/admi ... ndows.html
raydiation
Beginner
 
Posts: 24
Joined: Sat Nov 24, 2012 1:12 am
ownCloud version: 5.0.9
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4

Re: HowTo: OwnCloud on a Windows Server 2008 R2 (IIS 7.5)

Postby Blubber » Mon Mar 18, 2013 8:15 pm

Hello,

First of all you made great tutorial and put a lot of afford sharing it with the Community!
Thank you for that.
I think you might should one setting I'm missing in your Guide when running OC on Windows.
When you run MySql on localhost you should change the "dbhost" setting in the config.php from the OC config folder:
'dbhost' => 'localhost' --_> 'dbhost' => '127.0.0.1'

It will speed up the Browsing speed between the files and the different OC features a lot since Windows always needs to resolve localhost to 127.0.0.1.
Blubber
Newbie
 
Posts: 4
Joined: Tue Nov 27, 2012 7:28 pm
ownCloud version: 4.5.2

Re: HowTo: OwnCloud on a Windows Server 2008 R2 (IIS 7.5)

Postby chromosome » Fri Mar 29, 2013 2:32 pm

Managed to install it on Windows 8 Pro.

Fastcgi cpu usage seems to be quite high for 1-2 users. The server has a 1.5gz dual core and its using ~60% cpu.

Is this normal or any tips to lower it?
chromosome
Newbie
 
Posts: 2
Joined: Fri Mar 29, 2013 2:29 pm
ownCloud version: 4.5.8
Webserver: IIS
Database: MySQL
OS: Windows Desktop
PHP version: 5.4.3

Re: HowTo: OwnCloud on a Windows Server 2008 R2 (IIS 7.5)

Postby Rancor » Fri Mar 29, 2013 3:02 pm

There are some reports about high cpu usages on this forum.
*mostly inactive*
Rancor
OwnCloud master
 
Posts: 8153
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 7.0.1
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.5.x

Re: HowTo: OwnCloud on a Windows Server 2008 R2 (IIS 7.5)

Postby aelg305 » Mon Jul 22, 2013 1:04 am

I have
OC 5.0
Windows 7 - IIS6
MySQL 5.6.12.1
PHP 5.3.26 - non-threaded


I want to: send an email with OC, for example, sharing a photo...

Question: would OC be able to do this without any kind of extra configurations? (meaning: do i need to add the parameters to config.php, or my php.ini, or just install SMTP for IIS - I also run a OC on godaddy and for some reason does not required any extra info on config to send emails, probably due to a mail already setup)

I tried:
1- edit config with SMTP and PHP mail (not together, but tried both setups) with settings from my php.ini, using the port, host, unsure what to use for login and pass... since there is none setup!?.... no success of course!!

I dont want to rely on external servers, Do i need to enable SMTP from within IIS in order to accomplish this? (most likely.. just want to make sure) sorry, this may sound like super-n00b... but unsure why works on godaddy and not on my personal-pc-server config!
I have
OC 7.0.1
Raspberry Pi + Debian 7.0
Apache 2.0
Postcprl
aelg305
Beginner
 
Posts: 22
Joined: Tue May 21, 2013 11:57 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Windows Desktop
PHP version: 5.4.12

Re: HowTo: OwnCloud on a Windows Server 2008 R2 (IIS 7.5)

Postby aelg305 » Wed Sep 18, 2013 10:19 pm

OK, so after struggling a LOT with IIS i decided to move to Apache (WAMP) setup... seems better at the time... however...I spent so much time with the IIS setup and manage to keep a sort of change log that maybe someone else will find useful... photos are posted on the very 1st post...I just gather things from here and there....

My accomplishments:
Windows 7, with IIS
OC installed with working HTTPS, HTTPS auto-redirection
Fixed MIME, data folder errors, PHP and MySQL tweaks and performance optimization.
Enabled OC to send emails for password reminders, share folder links within system, etc.
Access OC remotely and enabled FTP (last one needs more verbose)



My SETUP:
-Dynamyc IP from ISP
-Windows 7 Home Premium
-OS 5.0
-IIS
-PHP
-MySQL


Few things to remember:
everytime a change is posted to IIS I recommend restarting the server
write down your passwords, links, path, etc
KEEP BACKUP OF YOUR FILES
its good practice to use https if you will be considering remote access
IIS does not play well with file with certain total amount of characters or certain characters at all, if your folders are showing "?" as the size or when you click them they are blank, this could very well be one of the reasons

Lets start:


(1)
Go to: Control Panel > program and features > Turn Windows features on or off
You will mark the check box for:
-IIS 6 Management console
-CGI
-Default Dcoument
-Directory Browsing
-HTTP Erros
-Static Content
-HTTP Logging
-Request monitor
-Static Content Compression
-Request filtering
CLick OK and wait until IIS is setup (to open go to your control panel > Administrative tools)


(2)
Install PHP:
1-Download the PHP installer for version “VC9 Non Thread Safe” 32 or 64 bit based on your system.
2-Run the wizard
3-Select IIS FastCGI


(3)
Install MySQL:
1-Download the MSI (binary or executable) for your current windows version 32-64
2-Select the default setup
3-When asked: created root password and save it


(4)
Remote Access:
For remote access, (outside your network) use a services like no-ip.com to create your own domain to access your instance of OwnCLoud
Update your router to forward ports 80 (http) and 443(https) to computer


(5)
Ensure Proper HTTP-Verb handling
IIS must pass all HTTP and WebDAV verbs to the PHP/CGI handler. Here is how to ensure your configuration is correct:
-Open IIS
-In the Connections bar, pick your site below Sites, or choose the top level entry if you want to modify the machine-wide settings.
-Choose the Handler Mappings feature click PHP_via_fastCGI.
-Choose Request Restrictions and find the Verbs tab.
-Ensure All Verbs is checked.
-Click OK.
-Next, choose Request Filtering feature from IIS Manager.
-Ensure that all verbs are permitted (or none are forbidden) in the Verbs tab.

Configuring for large uploads (PHP and IIS):
Got to your php.ini, usually under C:/program files/PHP and update:
-max_execution_time = 300
-memory_limit = 1G
-not updated - display_errors = On (if everything is working fine after installation, you MUST change this back to Off)
-post_max_size = 2G
-extension_dir = "ext"
-cgi.force_redirect = 0
-fastcgi.impersonate = 1
-upload_max_filesize = 2G
-extension=php_curl.dll
-extension=php_gd2.dll
-extension=php_mbstring.dll
-extension=php_mysql.dll
-extension=php_openssl.dll (since 4.5.1)
-extension=php_pdo_mysql.dll (since v4.0)
-date.timezone = "America/New_York" (you should select your time zone!)

NOW IIS:
Open IIS manager > Select the website > double click on the icon Request filtering > Select Edit Feature Settings and modify the Maximum allowed content length (bytes) to max: (3.9Gb) should be input as: 4187593113

Support for MIME (images):
-go into IIS > MIME > add
.svgz images/svg+xml *(where .svgz is the extension and, yes, the remaining is the mime: images/svg+xml)
.svg images/svg+xml
.xht application/xhtml+xml
.xhtml application/xhtml+xml
.woff application/x-font-woff

********* needs update ******
HTTPS certificate:
IF REMOTE ACCESS will be used (I recommend enabling secure connections):
from IIS manager > click on the top most layer, and click "created self signed certificate" (menu to the right)
Provide a name for the certificate
click on the default web site and then bindings
click add, select https, selecy the certificate previously created
got to https://localhost/owncloud and enabled "enforce https"
********* needs update ******
-- Restart IIS at this point --


(6)
-Download OC and unzip it to your desktop, then move it to IIS, (so it will look like C:/inetpub/wwwroot/OwnCLoud
-Richt click the OwnCloud folder, and give "USERS" the "write" access and click ok.
-Now open your browser and go to http://localhost/owncloud (or localhost if it is installed in the root www directory). This should bring up the ownCloud configuration page.
-At this page, you enter your desired ownCloud user name and password for the administrator, and expand the little arrow.
-Select MySQL as the database, and enter your MySQL database user name, password and desired instance name – use the user name and password you setup for MySQL earlier in step 3, and pick any name for the database instance.

-once you access your OC installation, you want to move your "data" directory outside from inetpub (you need some html coding here!)
-Go to inetpub/wwwroot/OwnCloud/Data, and move "Data" to other location, in my case I moved it to "C:/users/user_name/Data"
-Right click your moved Data folder and give IUSR users write access to data folder
-Go to your config.php under: inetpub/wwwroot/OwnCloud/Config/Config.php and edit the "Data" path to match that one that you just moved your folder



** Polishing and cleanup **

Localhost vs 127.0.0.1
-Edit "config.php" file located in owncloud\config folder, change the 'dbhost' entry from 'localhost' to '127.0.0.1'


Remote access within your machine (instead of localhost, you could use your *.no-ip.org)
-Edit your Windows "host"
-go to: %WinDir%\System32\Drivers\Etc -> host, and ediat/add:
127.0.0.1 localhost
your server IP wintin the intranet custom_domain.no-ip.org


To force Https within IIS, this will send all traffic from http to https
-Create an html file with name: "redirectToHttps.htm" and save it to wwwroot
-Code to go into file:
<html>
<head><title>Redirecting...</title></head>
<script language="JavaScript">
function redirectHttpToHttps()
{
var httpURL= window.location.hostname + window.location.pathname + window.location.search;
var httpsURL= "https://" + httpURL;
window.location = httpsURL;
}
redirectHttpToHttps();
</script>
<body>
</body>
</html>
-Go to IIS > top most level > Select "Error pages" > and then "Add Error Custom Error Pages"
Status code = 404.3
point to newly created file and click OK
-Click on edit feature setting -> custom error pages -> select the same path, save and restart IIS


***************NEEDS UPDATE*********************
FTP access (not in depth, but will give you basic access):
-Go to IIS
-right click on your site
click on "add FTP site"
gave a name and physical path, used port 990
change SSL to "allow SSL"
authentication: basic
allows access to -> specified users: Administrator
check read and write
Finish -> restart iis
***************NEEDS UPDATE*********************

Enabling OC to send mail (sharing files through link, notifications, password resets):
Got to "config.php" within OC
Add the following:
'mail_smtpmode' => 'smtp',
'mail_smtphost' => 'smtp.comcast.net:465', (Im using comcast, in my case would work with this)
'mail_smtpsecure' => 'ssl', (or whichever your SMTP uses)
'mail_smtpauth' => true,
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpname' => 'your_login',
'mail_smtppassword' => 'your_password',

Done, let me know how it goes
Questions, comments, updates, please let me know...
I have
OC 7.0.1
Raspberry Pi + Debian 7.0
Apache 2.0
Postcprl
aelg305
Beginner
 
Posts: 22
Joined: Tue May 21, 2013 11:57 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Windows Desktop
PHP version: 5.4.12

Re: HowTo: OwnCloud on a Windows Server 2008 R2 (IIS 7.5)

Postby RandolphCarter » Fri Sep 20, 2013 11:01 pm

Thanks for the HowTo, but please don't double-post. You know you could simply link your article from here?
RandolphCarter
Inventory
 
Posts: 4302
Joined: Wed May 30, 2012 8:42 am
ownCloud version: 7.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.x

Previous

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests