Virtual hosting with Wordpress not working

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
JHalve
New here
Posts: 6
Joined: Tue Jan 30, 2018 7:30 pm

Virtual hosting with Wordpress not working

Post by JHalve »

Hi there,
I hope someone can help me.
First the story. I have a TS-420 with 4 x 3TB disk in Raid 5. Everything works well. Now what i want is to use this Nas to be my own webserver. I enabled webserver on standard ports. I have created subfolders under /share/web like Map1, Map2, Map3 ( i use the names from my websites, here called map). Enabled virtual host, create Webx set to Map1 on port 71, create weby to Map2 on 72, create webz to Map3 on 73. Forward these ports on my router. Create on Dynu.com 3 redirects Map1.dynu.net on port 71, Map2.dynu.net on 72, Map3.dynu.net on 73. Created a index.php with Hello world, placed that in all maps. When i go to the internetbrowser and type Map?.dynu.net everything looks fine, respond on all 3 is hello world. Created a website with Dreamweaver Map1 and uploaded that to Map1, Also another website from dreamweaver to Map2 and everything is working. Very nice that virtual hosting. Now we come to the problem, Map3 is used to install Wordpress latest version, install went ok, I import a exported website (wich is in use with a provider) did the necessary updates, make a few changes and thought i was ready. When i type in Chrome, Edge, Safari Map1 (or 2).dynu.net i get my external ipadres with port 71 (or 72) attached, no problem, but when i type Map3.dynu.net (which is redirect to 73) i get my external ipadres without port and the error ERR_EMPTY_RESPONSE. I placed a index.php under /share/web with hello world. When i type the url i get not Wordpress but Hello world. It seems that somehow i get redirected to the root webfolder on port 80.

Anybody an idea to fix this? I have searched this forum and there are a few topics with this redirection, but all under other purposes or circumstances and not with a solution for me.

Another question is that is it webserver related or Wordpress related.

Thanks in advance for everybody to help me.

Regards Jan Halve
bl4d3
Starting out
Posts: 26
Joined: Fri Oct 05, 2012 3:03 am

Re: Virtual hosting with Wordpress not working

Post by bl4d3 »

You don't need different ports for each domain. Apache can distinguish them by domain name.
I recommend to use port 80 for HTTP only and forward all incoming traffic from the internet in your router to the station's IP addressalsoon port 80. I guess you forwarded those ports from range 71 to 73 in your example.

Btw, if it doesn't work in one of your browsers, you won't experience another result in another browser.
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”