Return full domain name?
Posted by: aburns (
Date: September 11, 2017 04:37PM

Hello all. New here, got a question.

I've installed WAMP Server on my Windows 10 box to test beta versions of my web site so that I don't have to experiment on the live site. I've got everything working great, except that the PHP script that powers the site uses a license code that is some type of encrypted version of the domain name. It won't load on anything except that domain. Of course, I have a license for the live site, but when I try to load the script on localhost with that license it chokes on the key. I reached out to the vendor for help, and they said they can't provide a key for localhost because that would basically be a crack of the software if it ever got out. I completely get that.

Sooooo...... I need to fool the script into thinking it's running on and not localhost/mydomain. Is there a way to set this up in my virtual host?

Edited 1 time(s). Last edit at 09/11/2017 04:39PM by aburns.

Options: ReplyQuote
Re: Return full domain name?
Posted by: Otomatic (Moderator)
Date: September 11, 2017 05:39PM


To use domain names, you need to create local sites as VirtualHost, see: The need for Virtual Host

It is not a good idea to use a ServerName or ServerAlias that is the same as your live domain name, as if we had used as the ServerName it would mean we could no longer get to the real live site from this PC as it would direct to i.e. this PC and not out onto the internet.

But you can use a subdomain, for example as ServerName in the VirtualHost.

Just ask your vendor to provide a key that is valide for subdomains. This works perfectly, this is what I use for some applications in my sites that need activation keys.

Wampserver 3.1.3 32 bit - Apache 2.4.33 - PHP 7.2.7/7.1.19/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.8
Wampserver 3.1.3 64 bit - Apache 2.4.33 - PHP 7.2.7/7.1.19/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.8
PhPMyAdmin 4.8.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote

Sorry, only registered users may post in this forum.