I am attempting to create a virtual host on my NAS and have run into some difficulty. This should be simple but thus far a solution has eluded me.
I have a TS-212P running firmware 4.1.2. I followed the instructions detailed in the user guide (QTS_user_manual_Home_eng_4.1.pdf, p. 193).
1. I went to "Control Panel" > "Applications" > "Web Server" to enable the web server.
2. I selected "Enable Web Server".
3. I selected "Enable secure connection (SSL)" and used the default port (8081)
4) I hit "Apply All" and it seemed to work. Looking in the system log it says "[WebServer] Started successfully."
5) I go to the "Virtual Host" tab
6) I select "Enable Virtual Host" and click "Apply". Looking in the system log it says "[Virtual Host] Virtual host is enabled successfully."
7) I click "Create a Virtual Host"
8 ) I fill in the following information in the dialog:
Host name: testsite.duckdns.org
Select a folder /Web/testsite
Specify a port: 9443
Select: HTTPS
9) I hit "Apply". This cursor spins for a while. When it stops spinning there is *NO* entry listed in the box that shows entries for virtual hosts. Likewise, I see nothing in the log to indicate that it has successfully created a virtual host. The software provides no feedback, positive or negative, that anything happened.
Has anyone seen this behavior? Is is a bug in the new firmware? I can ssh into the NAS and poke around although I am not an Apache server expert by any measure. Is there anything I can do to manually confirm that something happened or (perhaps) manually configure this without using the Web GUI?
Thanks for any assistance someone might be able to offer.
Cannot create virtual host
- pwilson
- Guru
- Posts: 22533
- Joined: Fri Mar 06, 2009 11:20 am
- Location: Victoria, BC, Canada (UTC-08:00)
Re: Cannot create virtual host
Code: Select all
nslookup testsite.duckdns.org
Server: 10.77.13.1
Address: 10.77.13.1#53
** server can't find testsite.duckdns.org: NXDOMAIN
Simply keep using the "nslookup" command to see if it is resolving. You can also get the "nslookup" command to use different servers, so you can check multiple DNS servers on the Internet, for example you can check to see if your domain has propagated to Google's OpenDNS servers with:
Code: Select all
nslookup testsite.duckdns.org 8.8.8.8
Code: Select all
nslookup testsite.duckdns.org 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
** server can't find testsite.duckdns.org: NXDOMAIN
If you want to serve up content for multiple Websites, simple register multiple FQDN's for your system, and then you can create a "virtual host" for each one. For example you could register "termperenceleague.duckdns.org" for your anti-alcohol website, and create "bobsbuzz4booze.duckdns.org" for your alcohol delivery service.
You could literally operate both websites on the same server, and the users of each one wouldn't know the other one exists.
Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs
Please review: When you're asking a question, please include the following.
-
- New here
- Posts: 2
- Joined: Sun Feb 01, 2015 1:20 am
Re: Cannot create virtual host
Thanks for the feedback . . . but I can't even get to the point of actually "creating" the virtual host entry from the QNAP GUI.
The "testsite.duckdns.org" is just an example - it doesn't actually exist. I verified using nslookup that my "real" FQDN actually does exist. This is not my problem. My problem is configuring Apache, via the QNAP GUI, to actually create an entry in its configuration files for the virtual host. When I go through all the steps I mentioned previously, there is *NO* entry in the list of virtual hosts (at least the GUI doesn't show it). I've done this before on an older QNAP NAS and never had a problem.
So, perhaps someone can suggest how I can manually add a virtual host entry to the Apache configuration files (or verify that the GUI is indeed failing). I'm not an expert on this particular topic but am quite comfortable around embedded Linux platforms and the command-line.
Thanks again . . .
The "testsite.duckdns.org" is just an example - it doesn't actually exist. I verified using nslookup that my "real" FQDN actually does exist. This is not my problem. My problem is configuring Apache, via the QNAP GUI, to actually create an entry in its configuration files for the virtual host. When I go through all the steps I mentioned previously, there is *NO* entry in the list of virtual hosts (at least the GUI doesn't show it). I've done this before on an older QNAP NAS and never had a problem.
So, perhaps someone can suggest how I can manually add a virtual host entry to the Apache configuration files (or verify that the GUI is indeed failing). I'm not an expert on this particular topic but am quite comfortable around embedded Linux platforms and the command-line.
Thanks again . . .
- pwilson
- Guru
- Posts: 22533
- Joined: Fri Mar 06, 2009 11:20 am
- Location: Victoria, BC, Canada (UTC-08:00)
Re: Cannot create virtual host
I'm afraid I don't know what to tell you. I just setup two "Virtual Hosts" here. Both worked instantly.gschmott wrote:Thanks for the feedback . . . but I can't even get to the point of actually "creating" the virtual host entry from the QNAP GUI.
The "testsite.duckdns.org" is just an example - it doesn't actually exist. I verified using nslookup that my "real" FQDN actually does exist. This is not my problem. My problem is configuring Apache, via the QNAP GUI, to actually create an entry in its configuration files for the virtual host. When I go through all the steps I mentioned previously, there is *NO* entry in the list of virtual hosts (at least the GUI doesn't show it). I've done this before on an older QNAP NAS and never had a problem.
So, perhaps someone can suggest how I can manually add a virtual host entry to the Apache configuration files (or verify that the GUI is indeed failing). I'm not an expert on this particular topic but am quite comfortable around embedded Linux platforms and the command-line.
Thanks again . . .
/etc/config/apache/extra/httpd-vhosts-user.conf
Code: Select all
NameVirtualHost *:80
<VirtualHost _default_:80>
DocumentRoot "/share/Web"
</VirtualHost>
<VirtualHost *:80>
ServerName XXXXXXXX.myqnapcloud.com
DocumentRoot "/share/Web/dokuwiki"
</VirtualHost>
<VirtualHost *:80>
ServerName YYYYYYYY.ddns.net
DocumentRoot "/share/Web/orca"
</VirtualHost>
Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs
Please review: When you're asking a question, please include the following.
-
- New here
- Posts: 2
- Joined: Sun Jul 24, 2011 5:28 pm
Re: Cannot create virtual host
(me: gerard visser, holland. QNAP TS-219P+ firmware 4.1.2 date 20150126)
I am afraid that the problem only appears when trying to add a https-virtual server.
having the webserver runnig just on port 80: no problems at all,
starting the https-server on 443: i can still find the http-websites
adding a virtual host with https (on port 443) doesn't result in an entry in the virtual hosts-list.
changing a virutal host from http:80 to https:443 doesnt result in a change in te list
I would very much appreciate some-one else to test this https-issue too: i think there is something wrong and not only with my imagination....
(spent over 10 hours on it: have to deliver a "proof of concept" to a company with several small websites running)
I am afraid that the problem only appears when trying to add a https-virtual server.
having the webserver runnig just on port 80: no problems at all,
starting the https-server on 443: i can still find the http-websites
adding a virtual host with https (on port 443) doesn't result in an entry in the virtual hosts-list.
changing a virutal host from http:80 to https:443 doesnt result in a change in te list
I would very much appreciate some-one else to test this https-issue too: i think there is something wrong and not only with my imagination....
(spent over 10 hours on it: have to deliver a "proof of concept" to a company with several small websites running)
- pwilson
- Guru
- Posts: 22533
- Joined: Fri Mar 06, 2009 11:20 am
- Location: Victoria, BC, Canada (UTC-08:00)
Re: Cannot create virtual host
Of course you can't do that. Port 443 is used by NAS Admin WebUI. Your normal HTTPS Webserver lives on port "8081/TCP" rather than Port 443/TCP.visser.gvm wrote:(me: gerard visser, holland. QNAP TS-219P+ firmware 4.1.2 date 20150126)
I am afraid that the problem only appears when trying to add a https-virtual server.
having the webserver runnig just on port 80: no problems at all,
starting the https-server on 443: i can still find the http-websites
adding a virtual host with https (on port 443) doesn't result in an entry in the virtual hosts-list.
changing a virutal host from http:80 to https:443 doesnt result in a change in te list
I would very much appreciate some-one else to test this https-issue too: i think there is something wrong and not only with my imagination....
(spent over 10 hours on it: have to deliver a "proof of concept" to a company with several small websites running)
My HTTPS Virtual Servers work here just fine:
When I access http://XXXXXXX.myqnapcloud.com I get Dokuwiki.
When I access https://XXXXXXX.myqnapcloud.com:8081/ I get Wordpress.
Works like a charm.
Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs
Please review: When you're asking a question, please include the following.
-
- New here
- Posts: 2
- Joined: Sun Jul 24, 2011 5:28 pm
Re: Cannot create virtual host
Thanks Mr. Wilson for your clear answer.
I was already afraid for this answer.
Allthough i disabled the 443 port in the admin-tool, one cann't run a secure website on de galatic-standard port 443.
To me it is not that "of course".
So now we have to create an extra line in the fire-wall nat-table: not quite salable.
Just looking around for alternatives now.
Kind regards
I was already afraid for this answer.
Allthough i disabled the 443 port in the admin-tool, one cann't run a secure website on de galatic-standard port 443.
To me it is not that "of course".
So now we have to create an extra line in the fire-wall nat-table: not quite salable.
Just looking around for alternatives now.
Kind regards
- schumaku
- Guru
- Posts: 43578
- Joined: Mon Jan 21, 2008 4:41 pm
- Location: Kloten (Zurich), Switzerland -- Skype: schumaku
- Contact:
Re: Cannot create virtual host
Disabling does not help - the port 443 remains reserved for the QTS Web UI.visser.gvm wrote:Allthough i disabled the 443 port in the admin-tool, one cann't run a secure website on de galatic-standard port 443.
If you intend to run small Web sites on https, it's strongly suggested to make use of the standard port - from strict corporate managed environment, other ports but 80/TCP and 443/TCP might be blocked. Do make this happen, change the QTS https port away from 443/TCP to 8443/TCP for example and enable https again.
Now you can make use of 443/TCP on the Web Server and the Virtual Web Server configuration.
Please note, this change might have to be deployed to mobile clients accessing QTS Web accordingly. Operating both the QTS and the Web server on 443/TCP is not possible.
Regards,
-Kurt.