Technical Discussion
  >> Home Networking, Internet Connection Sharing, etc.


Register (or login) on our website and you will not see this ad.


  Print Thread
Standard User RogerE
(committed) Fri 19-Jun-20 11:22:04
Print Post

WAMP on local server


[link to this post]
 
Have been developing PHP/Mysql system on local laptop using WAMP.

When ready pages are then uploaded to Hosting server.

Have just been given a dedicated server (windows Server 2012) for use at home. It has allowed me to rationalise everything on my PC, with dedicated "drives" for different purposes.

Is it possible to save and run the development pages from the server, rather than using the local laptop first and then transferring?

The server will only be linked to pcs on the local network (2 laptops and a PC)

Many thanks
Standard User prlzx
(experienced) Fri 19-Jun-20 12:07:50
Print Post

Re: WAMP on local server


[re: RogerE] [link to this post]
 
Use Apache2's Name-based virtual host to run multiple websites on the same server.

Note that if you are using databases to drive your website such as for content management, you still need to decide if the development and production sites use the same database or the development database is copy that you can safely break during testing.

For DNS the optimum approach is to populate whatever your local network uses for DNS with a CNAME for each website so that the development and live sites both resolve to the dedicated server's A record (and IP).

Your router might be able to do this, or Windows Server can run DNS service.

Failing that you can otherwise distribute these entries to the hosts files on each computer.
I mean, it's ok for the sake of a few computers but doesn't scale well and inconvenient if you'd like to check how well your web page layouts adapt on a tablet or smartphone.

For editing the web pages on the server using client software on the laptop:

* For client OSes other than Windows, folders on a server can be mounted by as SFTP paths and any editing software can work directly on the files as if local

* for the sake of Windows clients you can expose the folder containing your websites as a Windows File Share if it is only accessed from the local network



prlzx on iDNET: FTTC (VDSL) at ~40Mbps / 10Mbps
with IP4/6 (no v6? - not true Internet)

Edited by prlzx (Fri 19-Jun-20 12:17:31)

Standard User prlzx
(experienced) Fri 19-Jun-20 12:40:01
Print Post

Re: WAMP on local server


[re: prlzx] [link to this post]
 
A note about the DNS part, as having working DNS scales better in the long run than relying on port-based virtual hosts for web development.

Examples for a private network:

Private DNS domain name: my.lan (hosts in this network will have FQDNs of the form example.my.lan)
Windows server: winserver on IP 192.168.n.h
Development site: devsite
Production site: livesite

Laptop hosts file would have an entry like this (first entry after the IP is the canonical name of the host, and the remaining entries are its aliases):

Text
1
192.168.n.h   winserver.my.lan winserver   devsite.my.lan   livesite.my.lan


In a DNS server, the equivalent looks something like this

Text
1
23
45
NAME                    TYPE   VALUE
--------------------------------------------------winserver.my.lan.       A      192.168.n.h
devsite.my.lan.         CNAME  winserver.my.lan.livesite.my.lan.        CNAME  winserver.my.lan.




prlzx on iDNET: FTTC (VDSL) at ~40Mbps / 10Mbps
with IP4/6 (no v6? - not true Internet)


Register (or login) on our website and you will not see this ad.

Standard User RogerE
(committed) Thu 27-Aug-20 11:27:41
Print Post

Re: WAMP on local server


[re: prlzx] [link to this post]
 
Sorry for, apparently, not answering, but unfortunately the family got hit by "the epidemic" and have not been anywhere near a PC since.

Thanks for your replies - will start sorting this out soon.
  Print Thread

Jump to