Vi använder cookies för att hjälpa oss att förbättra vår webbsida. Läs vår Cookie Policy .

NAS 321

Hosting Multiple Websites with a Virtual Host

Hosting websites with the virtual host function and using DDNS service with ASUSTOR NAS

2022-12-14

COURSE OBJECTIVES

After completing this course you will be able to:

  1. Host websites on the ASUSTOR NAS using the virtual host function.
  2. Enable DDNS service for the ASUSTOR NAS.

PREREQUISITES

Course Prerequisites:

None

Students are expected to have a working knowledge of:

Hosting Websites


OUTLINE

1. Obtaining a Unique Hostname

1.1 If you have a static IP address

1.2 If you have a dynamic IP address

2. Hosting Websites Using the Virtual Host Function

2.1 Enabling the Web server

2.2 Enabling DDNS service

2.3 Adding a new virtual host (website)





1. Obtaining a Unique Hostname

You can host multiple websites on your ASUSTOR NAS by setting up virtual hosts. However, before setting up virtual hosts you should obtain a unique hostname for your ASUSTOR NAS either by registering for your own domain or by subscribing for DDNS service.



1.1 If you have a static IP address

If you have a static IP address, then you most likely will want to register for your own domain name. The company you register with will be able to provide DNS service for your unique hostname. You only need to provide them with your IP address and they will help you to map your hostname to your IP address.



1.2 If you have a dynamic IP address

If you have a dynamic IP address, then you may want to subscribe for free DDNS service in order to obtain a unique hostname for your ASUSTOR NAS. There are a number of companies offering free DDNS service. After registering with the company, you will be able to create a unique hostname and then have it mapped to your dynamic IP address. The company will periodically update your IP address in order to ensure that it is always mapped to your hostname.

After enabling the EZ-Connect service, ADM will enable the DDNS service of Your_Cloud_ID.myasustor.com. You can also apply for other DDNS services and connect to the NAS through this Domain name.





2. Hosting Websites Using the Virtual Host Function

ASUSTOR NAS supports virtual hosting for hosting multiple domain names on the NAS. In the following example we will walk you through the process of hosting a website using the virtual host function.



2.1 Enabling the Web server


STEP 1

  • In ADM click on [Web Center] [Web Server].
  • Select a web server package and PHP package.
  • Select [Enable Web server port] and [Enable secured Web server port].
  • Select [Also enable EZ-Connect port forwarding] and click on [Apply].


  • In order to check that the setting has been successfully applied, enter the ASUSTOR NAS's IP address into a Web browser and connect to it. You should be able to see the "Congratulations!" page as shown in the graphic below.

  • This page is located in the ASUSTOR NAS's [Web] shared folder. In order to host a website on the ASUSTOR NAS, you must upload it to the "Web" shared folder of the NAS.


2.2 Enabling DDNS service

If you have subscribed for DDNS service, you can also create a unique hostname to use with your NAS. In the following example we will walk you through the process of enabling DDNS service on the NAS.


STEP 1

  • In ADM click on [Settings] [Manual Connect] [DDNS].
  • Select [Enable DDNS service].
  • Select your DDNS provider from the drop-down list. You can choose to use the myasustor.com DDNS service if EZ-Connect service is enabled.
  • If you haven't signed up for DDNS service you can select a provider and then click on the [Sign up now] to register.
  • Fill out the rest of the required fields and then click on [Apply] once you are done. DDNS service should now be successfully enabled on the NAS.


After enabling the DDNS service, you are now ready to connect to your NAS using the internet.

  • Enter https://YOUR_DDNS:ADM HTTPS port/ into your Web browser to connect to your NAS.


  • Install ASUSTOR AiMaster or other Apps on Android or iOS devices to log in.



2.3 Adding a new virtual host (website)

You can use this feature to simultaneously host several websites on your NAS.


STEP 1

  • In ADM click on [Web Center].
  • Click on the Virtual Host and then click on the [Add].


STEP 2

  • The Virtual Host window will now appear. Fill out the required fields and then click [OK] once you are done. Your website should now be successfully hosted on the NAS.
    • Host name: Setting the DDNS name of the ADM here. (For example: CloudID.myasustor.com)
    • Protocol: Selecting HTTPS or HTTP here. Please select HTTPS if using DDNS host with valid certificates.
    • Certificate: Select the valid certificate for the host name when using the HTTPS protocol. (Introduced in ADM 4.2)
    • Port number: Default is 80 or 443, you can set another port that is not already in use.
    • Folder name: Please select the folder which include your own web content or other shared folders on ADM.
      Note: Users don't need to setup virtual host for the web server apps installed on ADM, and can simultaneously open different web apps through ADM Web Center. (For example: WordPress, PhpMyadmin, and etc.)
    • Status: Enabled by default, can be modified to disable it.


  • If there are other IPs on ADM that can set another DDNS name, then you can set different host name for virtual host.
  • Different ports are needed for different virtual hosts with same host name.


  • After enabling the virtual host, enter https://[YOUR_DDNS]:[Port]/ into your Web browser to visit the website of the virtual host.


Was this article helpful? Yes / No