Virtual host for Wordpress question

Questions about hosting a Website, using MySQL, PhP or MariaDB may be posted here.
Forum rules
This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:
https://myds.synology.com/support/suppo ... p?lang=enu

Virtual host for Wordpress question

Postby 4eyes » Thu Jul 07, 2011 10:43 am

Hi,

I am recently setting a Wordpress blog using http://www.mydomain.org/wordpress way without any problem. Later on I would like to use virtual host to point to the wordpress folder under /volume1/web.

My method is like this:
1. I renamed /web/wordpress to /web/wordpress.bak first
2. In DSM 3.1 Web service I created a new virtual host named wordpress of www.mydomain.org with port 8081
3. In router I turned on the port forwarding to redirect http://www.mydomain.org:8081/ to point to my DS's LAN IP address 192.168.1.2
4. I created a test index.php in the new created folder /web/wordpress and make sure my port forward feature functions properly to show a test welcome screen when I access the link http://www.mydomain.org:8081
5. Now I copy all those files and sub-folders from the previous folder, /web/wordpress.bak overwriting /web/wordpress including the index.php file

However, when I try to access http://www.mydomain.org:8081 right now it does not redirect me to http://www.mydomain.org/wordpress but http://www.mydomain.org:5000. I am puzzled how come it takes me to DSM login screen. :?

Moreover, I can still be able to access old method http://www.mydomain.org/wordpress to access but virtual host seems not working. :(

Any advice on where am I wrong in my procedures?
DS-712+ 1024MB; DSM 4.3-3810 Update 2
HDD: WD RED 4TB RAID-1
4eyes
Experienced
Experienced
 
Posts: 134
Joined: Fri Jan 19, 2007 5:44 pm

Re: Virtual host for Wordpress question

Postby mike42dk » Fri Jul 08, 2011 8:39 am

Hi

Why the change of ports?

I would make a sub folder to WEB folder, set up virtual host with my domain name, use port 80 (standard), point it to the new sub folder, install Wordpress in the new folder so i get my MySQL database links right, and it should work with that domain name.
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
DS-412+
2 WD red 2 TB harddrive RAID 1
1 Seagate 2 TB harddrive Basic
mike42dk
Sorcerer
Sorcerer
 
Posts: 2474
Joined: Sun Jun 06, 2010 7:45 am

Re: Virtual host for Wordpress question

Postby 4eyes » Fri Jul 08, 2011 8:59 am

Thank mike42dk.

I use other port other than 80 because I already have another web site running under /web so I need a virtual host to house wordpress whereas standard port 80 for my previous web site. I am also planning to add more virtual hosts for various PHP apps like Joomla for other purpose thus what I can use is to use non-port 80 ways to access these apps. :D

mike42dk wrote:Hi

Why the change of ports?

I would make a sub folder to WEB folder, set up virtual host with my domain name, use port 80 (standard), point it to the new sub folder, install Wordpress in the new folder so i get my MySQL database links right, and it should work with that domain name.
DS-712+ 1024MB; DSM 4.3-3810 Update 2
HDD: WD RED 4TB RAID-1
4eyes
Experienced
Experienced
 
Posts: 134
Joined: Fri Jan 19, 2007 5:44 pm

Re: Virtual host for Wordpress question

Postby mike42dk » Fri Jul 08, 2011 9:02 am

Hi

You don't need to change port, the virtual host redirect the traffic to the right pages, at least it dos it for me, same port for all virtual hosts.
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
DS-412+
2 WD red 2 TB harddrive RAID 1
1 Seagate 2 TB harddrive Basic
mike42dk
Sorcerer
Sorcerer
 
Posts: 2474
Joined: Sun Jun 06, 2010 7:45 am

Re: Virtual host for Wordpress question

Postby 4eyes » Fri Jul 08, 2011 9:16 am

Hi Mike42dk,

Forgive my naive in virtual host. Say, if I have few web sites under my www.mydomain.org.
1. /web
2. /web/phpmyadmin
3. /web/wordpress
4. /web/joomla

May I know what urls in your environment to access these sites? For me (maybe I am wrong), I originally suppose like this:
1. www.mydomain.org -> /web
2. www.mydomain.org:8081 -> /web/phpmyadmin
3. www.mydomain.org:8082 -> /web/wordpress
4. www.mydomain.org:8083 -> /web/joomla

Thanks :D

mike42dk wrote:Hi

You don't need to change port, the virtual host redirect the traffic to the right pages, at least it dos it for me, same port for all virtual hosts.
DS-712+ 1024MB; DSM 4.3-3810 Update 2
HDD: WD RED 4TB RAID-1
4eyes
Experienced
Experienced
 
Posts: 134
Joined: Fri Jan 19, 2007 5:44 pm

Re: Virtual host for Wordpress question

Postby mike42dk » Fri Jul 08, 2011 10:05 am

Hi

I have 3 domains, where the A-record is pointing towards my DS, on a fixed IP.

Domain1
domain2
domain3

I have set up 1 domain (domain1) as standard so its showing what is inside my WEB folder.

I have made 2 folders inside my WEB folder, like this
web/domain2/
web/domain3/

and then i set up my virtual host to,
Subfolder: domain2
Hostname: domain2.dk
Protokol: http
port: 80

and the same with the 3 domain, works for me.
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
DS-412+
2 WD red 2 TB harddrive RAID 1
1 Seagate 2 TB harddrive Basic
mike42dk
Sorcerer
Sorcerer
 
Posts: 2474
Joined: Sun Jun 06, 2010 7:45 am

Re: Virtual host for Wordpress question

Postby ldtran » Mon May 21, 2012 6:15 pm

Hello mike42dk,

I have a follow up question to this thread since the Synology support team was no help. I understand your suggestions about the virtual host creations above. I have a few questions of my own.

How do I:

1. Create individual blogs for each domain name? The Wordpress package install automatically installs in the ~/web root directory. Do I need to install or copy the ~/wordpress directory to each virtual host directory or just run the package that installed to allow blogs per domain (found in each virtual host directory)? If so, how can I do that with the spk file?

2. I registered several domains with godaddy and forwarded each to my DynDNS address. How do I make sure that the DynDNS address pointing to my home IP gets routed to each virtual host that has the respective domains? Does each domain need to be fwd to a unique DynDNS address which each DynDNS address must point to my home IP? The IP is dynamic due to the internet carrier, thus the use of the DDNS.

3. Do I have to create a different DynDNS address to point to my home IP or can one address suffice and the redirection to the Virtual host happen automatically by the Synology NAS?

Thank you in advance. No one has been able to help so far.
ldtran
I'm New!
I'm New!
 
Posts: 7
Joined: Mon May 21, 2012 6:10 pm

Re: Virtual host for Wordpress question

Postby mike42dk » Mon May 21, 2012 10:31 pm

ldtran wrote:Hello mike42dk,

I have a follow up question to this thread since the Synology support team was no help. I understand your suggestions about the virtual host creations above. I have a few questions of my own.

How do I:

1. Create individual blogs for each domain name? The Wordpress package install automatically installs in the ~/web root directory. Do I need to install or copy the ~/wordpress directory to each virtual host directory or just run the package that installed to allow blogs per domain (found in each virtual host directory)? If so, how can I do that with the spk file?

I don't use the package, but install wordpress in each web domain folder, wordpress is so easy to install, if you follow the help files.
2. I registered several domains with godaddy and forwarded each to my DynDNS address. How do I make sure that the DynDNS address pointing to my home IP gets routed to each virtual host that has the respective domains? Does each domain need to be fwd to a unique DynDNS address which each DynDNS address must point to my home IP? The IP is dynamic due to the internet carrier, thus the use of the DDNS.

Where you host your Domains there you setup your DDNS account for each domain, so each domain point towards your DS.
3. Do I have to create a different DynDNS address to point to my home IP or can one address suffice and the redirection to the Virtual host happen automatically by the Synology NAS?

Thank you in advance. No one has been able to help so far.


I use a Fixed address, but one DDNS account is OK, you setup in virtual host where each domain should point towards on your DS.
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
DS-412+
2 WD red 2 TB harddrive RAID 1
1 Seagate 2 TB harddrive Basic
mike42dk
Sorcerer
Sorcerer
 
Posts: 2474
Joined: Sun Jun 06, 2010 7:45 am

Re: Virtual host for Wordpress question

Postby ldtran » Wed May 23, 2012 3:38 am

Michael,

Thank you for the help.

1. Per your suggestion to install the Wordpress manually in each virtual host directory, should I download that install from wordpress.com or somewhere else?

2. So you mean I can just point each of my unique domain to my singular DynDNS domain which points to my DS? I think this is so because my router only has one DNS updater location to point to, which I will point to my DynDNS domain.

Thanks in advance.
ldtran
I'm New!
I'm New!
 
Posts: 7
Joined: Mon May 21, 2012 6:10 pm

Re: Virtual host for Wordpress question

Postby mike42dk » Wed May 23, 2012 9:21 pm

ldtran wrote:Michael,

Thank you for the help.

1. Per your suggestion to install the Wordpress manually in each virtual host directory, should I download that install from wordpress.com or somewhere else?

Yes, or if you are in need of a translated version, you can typically download it from a local hosting community.
2. So you mean I can just point each of my unique domain to my singular DynDNS domain which points to my DS? I think this is so because my router only has one DNS updater location to point to, which I will point to my DynDNS domain.

Thanks in advance.


At your Domain hosting service setup the Cname record to point towards your DDNS, and that should be it
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
DS-412+
2 WD red 2 TB harddrive RAID 1
1 Seagate 2 TB harddrive Basic
mike42dk
Sorcerer
Sorcerer
 
Posts: 2474
Joined: Sun Jun 06, 2010 7:45 am

Re: Virtual host for Wordpress question

Postby ldtran » Wed May 23, 2012 10:07 pm

Michael,

Thank you. I will look into the Wordpress install files on their site.

About the second point, if my Synology only has the option for one host name DDNS, and if I change the cname for each unique domain to my DDNS, then put that one DDNS host name in Synology to update the dynamic IP, then will the Synology be able to sort out to call out the right virtual host web site?

For this scenario, I have:

within Synology: I have the DynDNS DDNS host as a.dnsalias.com HTTP Port 80

My hosting service -->> DynDNS
www.domain1.com -->> a.dnsalias.com
www.domain2.com -->> b.dnsalias.com
www.domain3.com -->> c.dnsalias.com

Should my DynDNS be doing this?

a.dnsalias.com -->> my singular home dynamic IP
b.dnsalias.com -->> my singular home dynamic IP
c.dnsalias.com -->> my singular home dynacic IP

or should my DynDNS be doing this?

a.dnsalias.com -->> my singular home dynamic IP
b.dnsalias.com -->> a.dnsalias.com
c.dnsalias.com -->> a.dnsalias.com

I saw something floating around about the german site DDNS Update by QTip to enable Synology to have multiple host names, but the DNS update site needed to be updated which I don't know how to. Since it was an old post, I wonder if that is even necessary if the above scenarios work.
ldtran
I'm New!
I'm New!
 
Posts: 7
Joined: Mon May 21, 2012 6:10 pm

Re: Virtual host for Wordpress question

Postby ldtran » Sat May 26, 2012 2:54 am

Michael,

How do I create a subdirectory inside my virtual host directory to place the wordpress files? I created a /blog directory and placed the files there for the install but I am getting the page not found error when I execute the install.php.

I tried to place any index.html file inside either /mydomain/blog/ or /mydomain/blog/web-admin/ but could not see it pull up on the browser.

This is the last step to the wordpress install and it's bugging the hell out of me that install.php brings up nothing.
ldtran
I'm New!
I'm New!
 
Posts: 7
Joined: Mon May 21, 2012 6:10 pm

Re: Virtual host for Wordpress question

Postby axj » Sat May 26, 2012 7:47 am

That's because 'blog' is a hidden folder used ny Synology's photo/blog-application!
In same way, as you can write http://domain/photo to start photo, you can also write http://domain/blog to start the builtin blog-application! You may use Blog (big B) and it will work!
DS509+ 4*1TB Raid+1TB DSM 4.0-2219. Logitech BOOM+Duet 7.6.1, WebCam: Linksys WVC54GCA + TrendNet TV-IP121
DS212+ 1TB & D-Link DIR-685, HP C7280, Dell 3100cn. iPad3, Programming Pascal, Clarion 5.5, html/php. http://axj.dk
User avatar
axj
Specialist
Specialist
 
Posts: 1058
Joined: Fri Jan 02, 2009 10:59 am
Location: Esbjerg, Danmark

Re: Virtual host for Wordpress question

Postby ldtran » Sat May 26, 2012 4:29 pm

axj,

I tried your suggestion by changing the blog subdirectory within my virtual host to "Blog" and it still did not work. Is it because I created these subdirectories via the web gui in Filestation or windows explorer rather than some other method?

the error says: HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
ldtran
I'm New!
I'm New!
 
Posts: 7
Joined: Mon May 21, 2012 6:10 pm

Re: Virtual host for Wordpress question

Postby axj » Sun May 27, 2012 1:35 pm

I don't think there is real folder named 'blog', but some kind of a link is created when the 'blog' is activated from 'Photo Station'. My system is from a time before the 'Photo Station' was stand-alone, but if I use http://domain/photo, the photo-part of 'Photo Station' start and if I use http://domain/blog, the blog-part of the 'Photo Station' is started.
DS509+ 4*1TB Raid+1TB DSM 4.0-2219. Logitech BOOM+Duet 7.6.1, WebCam: Linksys WVC54GCA + TrendNet TV-IP121
DS212+ 1TB & D-Link DIR-685, HP C7280, Dell 3100cn. iPad3, Programming Pascal, Clarion 5.5, html/php. http://axj.dk
User avatar
axj
Specialist
Specialist
 
Posts: 1058
Joined: Fri Jan 02, 2009 10:59 am
Location: Esbjerg, Danmark

Next

Return to Web Server + PHP / MySQL + MariaDB

Who is online

Users browsing this forum: No registered users and 7 guests