Virtual Hosting on Qnap

I – Qnap Virtual Hosting

II – Activate the Web Server and Configure the Virtual Host Function on 4.x.x Firmware

III - Activate the Web Server and Configure the Virtual Host Function on 3.8.x Firmware

.

I – Qnap Virtual Hosting

Virtual host is a web server technique that provides the capability to host more than one domain (website) on one physical host offers a cost-effective solution for personal and small business with such need. You can host multiple websites (maximum 32) on the NAS with this feature.

In this tutorial we will use the information provided in the table below as the reference guide.

Host name

WAN/LAN IP and port

Document root

Demo web application

site1.mysite.com

WAN IP: 111.222.333.444

LAN IP: 10.8.12.45 (NAS)

Port: 80 (NAS)

/Qweb/site1_mysite

Joomla!

site2.mysite.com

/Qweb/site2_mysite

WordPress

www.mysite2.com

/Qweb/www_mysite2

phpBB3 

Before you start, make sure you have checked the following items:

Web Server: Enable Web Server in “Applications” > “Web Server”.

• DNS records: The host name must point to the WAN IP of your NAS and you can normally configure this from your DNS service providers.

• Port forwarding: If the web server listens on port 80 you need to configure port forwarding on your router to allow inbound traffic from port 80 to the LAN IP (10.8.12.45) of your NAS.

• SSL certificate import: If you are going to enable SSL connection for the website and intend to use your own trusted SSL certificates you may import the certificate from within the administration backend under “System Settings” > “Security” > “Certificate & Private Key”.

.

II – Activate the Web Server and Configure the Virtual Host Function on 4.x.x Firmware

Follow the steps below to use virtual host.

1. Select “Enable Virtual Host” and click “Apply”.

2. Click “Create a Virtual Host”.

3. Enter the host name and specify the folder (under Web or Qweb) where the web files will be uploaded to.

4. Specify the protocol (HTTP or HTTPS) for connection. If you select HTTPS, make sure the option “Enable Secure Connection (SSL)” in Web Server has been turned on.

5. Specify the port number for connection.

6. Click “Apply”.

7. Continue to enter the information for the rest of the sites you want to host on the NAS.

8.Create a folder for each website (site1_mysite, site2_mysite, and www_mysite2) and start transferring the website files to the corresponding folders.

Once the files transfers complete point your web browser to the websites by http://NAS_host_name or https://NAS_host_name according to your settings. In this example, the URLs are:

http://site1.mysite.com

http://site2.mysite.com

http://www.mysite2.com

You should see the Joomla!, phpBB3, and WordPress web pages, respectively.

.

III – Activate the Web Server and Configure the Virtual Host Function on 3.8.x Firmware

Activate the Web Server and Configure the Virtual Host Function

Login the administration page and then go to ‘Network Services’ > ‘Web Server’. Check the box ‘Enable Web server’ and click ‘Apply’.

Next go to the ‘Virtual Host’ tab and check the box ‘Enable Virtual Host’ and click ‘Apply’.

Click ‘Create New Virtual Host’ to start the wizard and enter the required information (Host name, Folder name, Protocol and Port) then click ‘Apply’.

Continue to enter the information for the rest of the sites you wish to host on the NAS.

Upload the Website Data to the NAS

So far we have NAS configured to host multiple websites and next we are going to upload the files for each website by mapping the Web (or Qweb) share folder to your desktop.

Once the ‘Web’ share folder is mapped create a folder for each website (site1_mysite, site2_mysite and www_mysite2) and start transferring the website files to the corresponding folders we created.

Once the files transfers complete point your web browser to the websites by entering the following URL:http://site1.mysite.comhttp://site2.mysite.comhttp://www.mysite2.comYou should see the Joomla!, phpBB3 and WordPress web pages respectively. Additional setup options including enabling SSL connections or choose another port number other than port 80.

VN:F [1.9.22_1171]
Rating: 8.0/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)
Qnap Üzerinde Birden Fazla Site Yayını (Virtual Host)Virtual Hosting on Qnap, 8.0 out of 10 based on 3 ratings

One Response to Virtual Hosting on Qnap

  1. József Kiss says:

    Dear Support Team.

    I made this instruction on my QNAP TS269L but from explorer I getting error no DNS can’t locate.
    If I enter my IP and port number working well. I have to configure anything else?
    I have an PHP webpage.
    Thanks in advance.
    Best Regards,
    József

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>