IIS 7.5 and IIS 8.0 European Hosting

BLOG about IIS 7.5 Hosting, IIS 8.0 Hosting and Its Technology - Dedicated to European Windows Hosting Customer

IIS 8.0 with Free ASP.NET Hosting - HostForLIFE.eu :: How to Use IISNode to Run Node.js Application Under IIS

clock June 24, 2015 06:06 by author Rebecca

In this post, you will see how to install and run Node.js in IIS with IISNode.

Installing Node.js

Firstly, you need to install Node.js engine on server which can be download from http://www.nodejs.org/#download. Installing Node.js engine will enable us to run node.js application on windows server. But still you have to require configuring IIS so it can route .js requests to the Node.js engine. This can be easily done with the help of IISNode module for IIS 7.x. Once you install IISNode module, you can configure web.config file to route .js or particular file to iisnode module. IISNode module can be downloaded from https://github.com/tjanczuk/iisnode/archives/master once you install iisnode, you will able to find IISNode module in IIS Manager under modules.

Get IIS Ready to Run Node.Js Application

IISNode will also install sample application to get started with Node.js. Sample application is copied within IISNode installation directory. If you installed iisnode with default settings, then sample can be found in C:\Program Files\iisnode\www directory. To run this sample application, create new application within default website for e.g. let say nodejsapp which points to sample application directory mentioned above. Now go to http://localhost/nodejsapp/ and you should able to see different sample link on your browser:

Now let examine HelloWorld sample. Go to http://localhost/nodejsapp/helloworld/hello.js to run server side JavaScript with the help of node.js engine.

It looks there are some issue with application pool write permission. There are two temporary workaround to deal with this permission issue. One is disable logging by adding following key in web.config. Another one is create one application pool with identity as LocalSystem and assign that application pool to the nodejsapp application. If you run into a 503 status code with IIS reporting error code 0x5 (ERROR_ACCESS_DENIED), make sure the identity of the application pool running the site that hosts your node.js application has read & execute rights to node.exe on disk. If you are using the default IIS configuration (DefaultAppPool running under ApplicationPoolIdentity), you can set appropriate ACLs on the node.exe by running:

icacls %systemdrive%\node\node.exe /grant IIS_IUSRS:rx

Now you should able to run Node.js sample shipped with IISNode.

IIS 8.0 with Free ASP.NET Hosting
Try our IIS 8.0 with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc.

IIS 8.0 with Free ASP.NET Hosting - HostForLIFE.eu :: How to Secure PHP with php.ini on IIS

clock June 16, 2015 07:23 by author Rebecca

This tutorial will guide you through protecting your server from malicious PHP scripts and also allows you to run multiple sites with different configurations which is imperative in a multiple domain environment for security reasons. To complete this tutorial, you must have working installation of IIS with PHP installed and at least 2 websites.

1. Setting up a php.ini file

Step 1

PHP arrives by default with 2 PHP.ini files. These are overly complex for a new user and ultimately not everything within it is needed. Here, you will use a stripped down version of a php.ini file which I have developed over several years for the “average” setup. Here is a default php.ini file:

; Time Zone
date.timezone = GMT

; Fast CGI fixes for IIS

; Base directories for htdocs, uploads and sessions
open_basedir = c:\sites\your_website\
;doc_root = c:\sites\your_website\
upload_tmp_dir = c:\sites\your_website\
; Double backslash the session save path. Remember to create the session folder.
; Option only applies when WinCache is not being used
session.save_path = c:\\sites\\sessions\\

; Extension Dir
extension_dir = "./ext/"

; These need disabling for php5.4 as they're deprecated
; You should never need to enable these if your scripts are secure
safe_mode = Off
register_long_arrays = Off
allow_call_time_pass_reference = Off
register_globals = Off

; Logging
log_errors = On
error_log = syslog

; Error Reporting
error_reporting  =  E_ALL & ~E_NOTICE
display_errors = On
display_startup_errors = Off

; Disable functions that could cause a security risk, comma separated
disable_functions = system,shell_exec,exec,escapeshellarg,escapeshellcmd,passthru,proc_ close,proc_ get_ status,proc_ open,proc_terminate

; Memory limits
max_execution_time = 60     ; Maximum execution time of each script, in seconds
max_input_time = 60    ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 64M      ; Maximum amount of memory a script may consume (128MB)
post_max_size = 8M

; Sendmail / mail()
SMTP = localhost
smtp_port = 25
;sendmail_from = [email protected]

; File Uploads
file_uploads = On
upload_max_filesize = 100M

; fopen wrappers
allow_url_fopen = On
allow_url_include = On
default_socket_timeout = 10

; Extensions

; WinCache

; More info http://us2.php.net/manual/en/wincache.configuration.php

; To use these make sure the WinCache DLL is enabled

; Enable WinCache?
; If you disable WinCache be sure to set the session.save_handler to "files"
wincache.fcenabled = 0

; Defines a comma-separated list of IIS web site identifiers where file cache should be enabled or disabled.
wincache.fcenabledfilter =

; Defines the maximum memory size (in megabytes, default 24) that is allocated for the file cache.
; If the total size of all the cached files exceeds the value specified in this setting,
; then most stale files will be removed from the file cache.
wincache.fcachesize = 24

; Enables or disables the file change notification detection functionality.
wincache.fcndetect = 1

; Defines the maximum allowed size (in kilobytes, default 256) for a single file to be cached.
; If a file size exceeds the specified value, the file will not be cached.
; This setting applies to the file cache only.
wincache.maxfilesize = 256

; Enables or disables the opcode cache functionality
wincache.ocenabled = 1

; Defines a comma-separated list of IIS web site identifiers where opcode cache should be enabled or disabled.
wincache.ocenabledfilter =

; Defines the maximum memory size (in megabytes, default 96) that is allocated for the opcode cache.
; If the cached opcode size exceeds the specified value, then most stale opcode will be removed from the cache.
; Note that the opcode cache size must be at least 3 times bigger than file cache size.
; If that is not the case the opcode cache size will be automatically increased.
wincache.ocachesize = 96

; Defines how many files (default 4096) are expected to be cached by the extension, so that appropriate memory size is allocated at the startup time.
wincache.filecount = 4096

; Defines how often (in seconds, default 30) the extension checks for file changes in order to refresh the cache.
; Setting it to 0 will disable the refreshing of the cache.
wincache.chkinterval = 600

; Defines the maximum time to live (in seconds, default 1200) for a cached entry without being used.
; Setting it to 0 will disable the cache scavenger, so the cached entries will never be removed
; from the cache during the lifetime of the IIS worker process.
wincache.ttlmax = 1200

; Defines if caching is enabled when PHP is running in command line (CLI) mode.
wincache.enablecli = 0

; Defines a list of files that should not be cached by the extension.
; The files list is specified by using file names only, separated by the pipe symbol - "|".
; E.g. wincache.ignorelist = "index.php|misc.php|admin.php"
wincache.ignorelist =

; Defines a string that will be used when naming the extension specific objects that are stored in shared memory.
; This is used to avoid conflicts that may be caused if other applications within an IIS worker process tries
; to access shared memory. The length of the namesalt string cannot exceed 8 characters.
wincache.namesalt =

; Enables or disables the user cache functionality.
wincache.ucenabled = 1

; Defines the maximum memory size in megabytes (default 8) that is allocated for the user cache.
wincache.ucachesize = 8

; Defines the maximum memory size in megabytes that is allocated for the session cache.
wincache.scachesize = 8

; Specifies an absolute or a relateve path to the reroute.ini file that contains the list of PHP functions whose
; implementation should be replaced with the WinCache function equivalents.
wincache.rerouteini =

;; ####
;; Don't edit these unless you know what you're doing!
;; ####

; Sessions
; "files" - save to files
; "wincache" - use WinCache
session.save_handler = files
session.use_cookies = 1
session.name = PHPSESSID
session.cache_limiter = nocache
session.cache_expire = 180

; Default MIME-TYPE
default_mimetype = "text/html"

; Allow

Step 2

There are several items that you will need to amend before it is ready for use on your server:

  • Copy and paste the text in the box above into a new text file.
  • Inside your PHP folder, create a folder called ‘ini’.
  • Save the text file inside the ini folder you just created.
  •  Rename the file to the name of your website. For example ‘yourdomain.com.ini’.
  • Open the file in your favourite text editor.

From here, now you need to change some settings in the php.ini to suit your setup:

1. Change this to your time zone.

date.timezone = GMT

Here is a link to a list of valid time zones: Time Zones. You will need to do this to make sure the time and date is correctly reported to PHP scripts.

2. Change the below paths to the location of your website root folder.

; Base directories for htdocs, uploads and sessions
open_basedir = c:\sites\your_website\
;doc_root = d:\public_html\iisunderground\
upload_tmp_dir = c:\sites\your_website\
; Double backslash the session save path
; Option only applies when WinCache is not being used
session.save_path = c:\\sites\\sessions\\

The session.save_path must have double backslashes, so don’t forget. Also be sure to create the sessions folder. You should not store the sessions folder inside your web accessible folder for security reasons. These directories are used to prevent scripts from accessing locations outside of their web accessible folders. The defined folder is the “lowest” they can go. They can go forward  directories but not backwards beyond this set folder.

3. Change SMTP to the host you wish to use for e-mail.

; Sendmail / mail()
SMTP = localhost
smtp_port = 25
;sendmail_from = [email protected]

Normally this will stay at the default ‘localhost’ if you are using a mail server on your system. Change SMTP port to the port the mail server SMTP service uses. The default is 25 and normally won’t need to be changed. Un-comment sendmail_from (removing the semi-colon) if you intend to use a global address to send mail from. Lots of sites will use [email protected].

4.Change the extennsions.

; Extensions

There are lots of extensions to choose. If you ever find that your scripts tell you an extension or function is not available, you can often un-comment the extension (remove the semi-colon) here, save the file and restart IIS to get it working. The defaults enabled already will get you going for most applications.

WinCache is an extension for IIS that enables caching of PHP scripts. This allows them to run up to 5-10x faster than normal.

To enable WinCache, follow the installation tutorial and then set this extension to ‘1’ (enabled) rather than ‘0’ (disabled):

; Enable WinCache?

; If you disable WinCache be sure to set the session.save_handler to "files"
wincache.fcenabled = 0

The default settings will get you moving. If you ever come back to developing a site, you may need to disable WinCache to avoid the script being cached while you work on it. WinCache is designed for production systems only when using long cache time periods.

2. Configuring IIS to accept the new php.ini

The php.ini is now ready to be configured into IIS.

  • Open the IIS Manager from Start > Control Panel / Administrative Tools / IIS Manager.
  •  On the left hand side, select your website from the sites list.
  • From the icons, select Handler Mappings just as you would for installing PHP.
  • Find your php handler mapping in the list and double click it.
  • Under the executable box, you will have your PHP executable location. We need to edit it to include your php.ini file:

Example: c:\php\php-cgi.exe|-c c:\php\ini\your_website.com.ini
The '-c' modifier tells PHP to load a custom php.ini file.

  • Using the above example, modify it to your PHP location and your php.ini location.
  • Once you are done, click OK.

3. Test your configuration

Your modified php.ini is now installed. All that is left to do is test your website to make sure it is working as intended. To do this, create a php file and include the following code:

<?php phpinfo(); ?>

Save it to your web accessible folder and then navigate to it in your browser. If you get something that looks like this, then you have been successful.

For each site you have now or create in the future, follow this process to make sure it has it’s own php.ini file. This ensures it will be secure and if you are hosting others, it makes sure they can’t access other peoples files by locking them down into their own folders.

IIS 8.0 with Free ASP.NET Hosting
Try our IIS 8.0 with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc.

IIS 8.0 with Free ASP.NET Hosting - HostForLIFE.eu :: How to Install and Use URL Rewrite in IIS

clock June 3, 2015 06:57 by author Rebecca

In this post, I'm going to show you how to install and use IIS URL Rewrite. The IIS URL Rewrite module may be a better solution than HTTP Redirect in IIS. You can effectively “redirect” from http://domain.com to http://www.domain.com. Of course the URL rewrite has many more uses and features, but I will use it for redirection purposes in this tutorial.

IIS URL Rewrite Installation

To get the below URL Rewrite code to work in IIS, you must first install the URL Rewrite module. The URL Rewrite module is not installed by default. To install the IIS URL Rewrite module: Go Here and click install… Or just click Here. Once installed you may need to reboot.

IIS URL Rewrite after Installation

You can double click and make your URL rewrite rule using the interface, or edit the web.config. See below:

IIS URL Rewrite code in the web.config

IIS URL Rewrite http:// to http://www :

<!--web.config url rewrite-->
              <rule name="RedirectToWWW" stopProcessing="true">
                  <match url=".*" ignoreCase="true" />
                      <add input="{HTTP_HOST}" pattern="^domain.com$" />
                  <action type="Redirect" url="http://www.domain.com/{R:0}" redirectType="Permanent" />

Previous to IIS7 this was handled in:


The above code can be viewed in the URL rewrite module interface. It’s illustrated below. You may add or modify in either the web.config, or this interface. The main thing is to get it installed, and most likely reboot.

URL Rewrite Rules Interface in IIS

IIS redirect using URL Rewrite

Notice under the “Action” section in the above image there is a selection for “Action type”. Among other choices you can choose “Redirect.” Once selected there are then places for you to select “Redirect URL,” and “Redirect type,” such as “Permanent (301).”

IS 8.0 with Free ASP.NET Hosting
Try our IIS 8.0 with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc.

HostForLIFE.eu Proudly Launches Drupal 7.37 Hosting

clock June 1, 2015 09:41 by author Peter

European Windows and ASP.NET Spotlight Hosting Partner in Europe, HostForLIFE.eu, has announced the availability of new hosting plans that are optimized for the latest update of the Drupal 7.37 hosting technology.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam (NL), London (UK), Paris (FR), Frankfurt(DE) and Seattle (US) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security, and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. The customers can start hosting our Drupal site on our environment from as just low €3.00/month only.

Drupal is an open source content management platform powering millions of websites and applications. Thousands of add-on modules and designs let you build any site you can imagine. Drupal 7.37 Includes bug fixes and small API/feature improvements only (no major new functionality); major, non-backwards-compatible new features are only being added to the forthcoming Drupal 8.0 release. If you are looking for the right Windows ASP.NET Hosting provider that support Drupal 7.37, we are the right choice for you.

The 7.37 update also includes fixed a regression in Drupal 7.36 which caused certain kinds of content types to become disabled if we were defined by a no-longer-enabled module, removed a confusing description regarding automatic time zone detection from the user account form (minor UI and data structure change), allowed custom HTML tags with a dash in the name to pass through filter_xss() when specified in the list of allowed tags, allowed hook_field_schema() implementations to specify indexes for fields based on a fixed-length column prefix (rather than the entire column), as was already allowed in hook_schema() implementations, fixed PDO exceptions on PostgreSQL when accessing invalid entity URLs, added a sites/all/libraries folder to the codebase, with instructions for using it and added a description to the "Administer text formats and filters" permission on the Permissions page (string change).

HostForLIFE have hosted large numbers of websites and blogs until now. Our clients come from diverse backgrounds from all sectors of the economy. HostForLIFE.eu clients are specialized in providing supports for Drupal for many years. We are glad to provide support for European Drupal 7.37 hosting users with advices and troubleshooting for our client website when necessary.

HostForLIFE.eu is a popular online Windows based hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market. Our powerful servers are especially optimized and ensure Drupal 7.37 performance. We have best data centers on three continent, unique account isolation for security, and 24/7 proactive uptime monitoring.

For more information about this new product, please visit http://hostforlife.eu/European-Drupal-737-Hosting

About HostForLIFE.eu
HostForLIFE.eu is an European Windows Hosting Provider which focuses on the Windows Platform only. HostForLIFE.eu deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

HostForLIFE.eu is awarded Top No#1 SPOTLIGHT Recommended Hosting Partner by Microsoft (see http://www.asp.net/hosting/hostingprovider/details/953). Our service is ranked the highest top #1 spot in several European countries, such as: Germany, Italy, Netherlands, France, Belgium, United Kingdom, Sweden, Finland, Switzerland and other European countries. Besides this award, we have also won several awards from reputable organizations in the hosting industry and the detail can be found on our official website.

About HostForLIFE.eu

HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2016 Hosting, ASP.NET Core 2.2.1 Hosting, ASP.NET MVC 6 Hosting and SQL 2017 Hosting.

Tag cloud

Sign in