0

I am trying to setup vHost on my QNAP web server (Running Apache). I seem to be stuck at the point where I can't load the subdomains. I have included a custom conf file in the apache.conf file like so:

include /share/Web/customapache.conf

In the customapache file, I have the following:

NameVirtualHost *:80
ServerName 127.0.0.1

DocumentRoot "/share/Web/site1-home"
  <Directory />
    Order deny,allow
    Deny from all
  </Directory>
ServerSignature Off
ServerTokens Prod
NameVirtualHost *:80

<VirtualHost *:80>
   ServerName localhost
   # ServerAlias www.localhost
   DocumentRoot "/share/Web/site1-home"
   <Directory "/share/Web/site1-home">
      Options FollowSymLinks MultiViews
      AllowOverride All
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>

<VirtualHost *:80>
   ServerName pods.localhost
   # ServerAlias www.pods.localhost
   DocumentRoot "/share/Web/site2-pods"
   <Directory "/share/Web/site2-pods">
      Options FollowSymLinks MultiViews
      AllowOverride All
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>

It's probably a bit of a mess as I have been trying multiple different examples trying to fix whatever issues I have. I am fairly new to linux, and apache to be honest. I was able to get it all working fine in NGINX, however I ran into some compatability issues with QNAP.

Essentially, the main redirect is working, so that the base directory is now /share/Web/site1-home, but the subdomain is not working (pods.localhost). I am sure its something simple I am missing, or even something I have added that I do not need. But any assistance, or even a point in the right direction would be much appreciated.

Regards Kirt

Citris
  • 79
  • 1
  • 9
  • Did you ever find your issue? I'm having a very similar issue by the sounds of it. Nginx was also working but issues with post 80. – nullable Mar 30 '17 at 10:48
  • For the sake of anyone's sanity; the reason I had issues because my ISP, namely COX, block port 80. Your only options are to, either; redirect, or reverse proxy on another machine which has the sub/domain pointing to it. You could even try 443 and solely use https. – nullable Mar 31 '17 at 00:22

0 Answers0