Nette Framework – installation instructions

Preparing for installation

Webhosting

If you do not have established webhosting yet, you can order it here, after receipt of payment the hosting will be established and you will receive FTP login details by e-mail.

Download Nette Framework

Download Nette Framework, the current version of the Nette Framework 2.1.1 can be found at this link

Extract the downloaded archive and from the “sandbox” folder copy all files and folders of Nette Framework to webhosting via FTP.

Creating a database

How to create a MySQL database:

  1. Log in to customer center WEDOS
  2. On tab Webhosting open webhosting detail, on which will be installed the database
  3. In the left corner use link to  create new database
  4. Enter any name and click on create.

Within a few minutes you will recive login details to MySQL database at your e-mail .

Uploading files via FTP

1. Nette as the first major presentation in the root directory of the hosting

Contents of the “sandbox” copy to the /www directory on webhosting. Edit file .htaccess in this directory , it must contains this rules:

RewriteEngine On

# aliases
RewriteCond %{REQUEST_URI} !^domains/
RewriteCond %{REQUEST_URI} !^/domains/
RewriteCond %{HTTP_HOST} ^(www.)?(.*)$
RewriteCond %{DOCUMENT_ROOT}/domains/%2 -d
RewriteRule (.*) domains/%2/$1 [DPI]

# subdom (with/out www)
RewriteCond %{REQUEST_URI} !^subdom/
RewriteCond %{REQUEST_URI} !^/subdom/
RewriteCond %{HTTP_HOST} ^(www.)?(.*)\.([^.]*)\.([^.]*)$
RewriteCond %{DOCUMENT_ROOT}/subdom/%2 -d
RewriteRule (.*) subdom/%2/$1 [DPI]

# aliases - missing / 
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^domains/[^/]+/(.+[^/])$ /$1/ [R]

# subdomains - missing / 
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^subdom/[^/]+/(.+[^/])$ /$1/ [R]

# Nette Framework
RewriteCond %{HTTP_HOST} ^(www.)?(.*).([^.]*).([^.]*)$
RewriteCond %{DOCUMENT_ROOT}/domains/%2.%3.%4 !-d
RewriteCond %{DOCUMENT_ROOT}/subdom/%2 !-d
RewriteCond %{HTTP_HOST} ^(www.)?([^.]*).([^.]*){2,4}$
RewriteCond %{REQUEST_URI} !^www/
RewriteCond %{REQUEST_URI} !^/www/
RewriteCond %{DOCUMENT_ROOT}/www -d
RewriteRule (.*) www/$1 [DPI]
# Nette Framework

2. Nette as an alias or subdomain

If you are going to operate multiple content management systems and e-shops (as aliases or subdomains), please follow this article Various content management systems on a single web hosting.

In case of Nette installation as alias copy contain of folder „sandbox“ to „www/domains/domain.tld“ (or „www/domains/subdomain.domain.tld“) on FTP. Also in this folder, create a file .htaccess, which will contain the following code:

RewriteEngine On
RewriteRule (.*) www/$1 [L]

In case of installation of Nette as subdomain copy contain of folder „sandbox“ to „www/subdom/subbdomain“ on FTP. Also in this folder, create a file .htaccess, which will contain the following code:

RewriteEngine On
RewriteRule (.*) www/$1 [L]

By typing the URL into a browser, you can now verify the functionality of the currently installed Nette Framework.