Virtual Host

With virtual hosts, you can set up multiple websites on Synology NAS. A domain name is required for virtual host setup. Each virtual host can be either Name-based or Port-based. Each virtual host website requires a Document root directory for file storing and accessing.

To add a new virtual host:

  1. Click Create.
  2. Select the type of virtual host: Name-based or Port-based.
  3. Enter the Hostname and select the protocol and port number.
  4. Select the Document root directory which will be used for file storing and acceessing. (Refer to Note section below.)
  5. Select whether to enable HSTS (forces browser to use HTTPS connection) and HTTP/2 to speed up the web transfer.
  6. Select the HTTP back-end server for this virtual host.
  7. Select the PHP profile you wish to apply to the virtual host.
  8. Click OK to save settings.
  9. When SSL encryption connect is enabled, you will be promoted and redirected to the Certificate page for further setup.

Note:

  • For better flexibility and security, Web Station uses the http user group to execute tasks. Therefore, for Web Station to function normally , please change the http group's access permissions for each corresponding folder and file. For example, if you want to make the vhost1 folder accessiable via Web Station, you'll need to make sure the http group has proper read/write permissions for the vhost1 and files/folders in it.
  • The purpose of changing file access permission is for Web Station to function normally, it can't limit file access permission. To prevent information exposure, please do not store your sensitive information in Web Station's shared folder and document root directory of Virtual Host.