Copy siteA to siteB, siteB not working
Posted by: willlee (---.res.spectrum.com)
Date: May 25, 2024 07:23PM

Using wordpress creating siteA under www directory with siteA as the subdirectory under www and it works. Then create siteB by copying siteA to the subdirectory siteB under www in the same machine, both websites use the same ssl, verify all the configuration files like httpd.conf, httpd-vhosts.conf, and httpd-ssl.conf are all correct. And also in PhpMyAdmin, create a new siteB database and export siteA database and import it to siteB.

Always get the following error in browser:
Your VirtualHost (5)
localhost - Not a Listen port
siteA.com:443 - Not a Listen port
siteB.com:443 - Not a Listen port
Port used for the VirtualHost is not an Apache Listen port
Duplicate ServerName siteA.com siteB.com into c:/wamp64/bin/apache/apache2.4.58/conf/extra/httpd-vhosts.conf


Any solution is greatly appreciated!

Options: ReplyQuote
Re: Copy siteA to siteB, siteB not working
Posted by: Otomatic (Moderator)
Date: May 26, 2024 09:55AM

Local sites must use VirtualHost, as with all hosting providers.
See:
The need for Virtual Host
and
Wampserver 3 - Create or add a VirtualHost

What's more, WordPress writes its own URL to its database, so you need to modify the database to include the local url.

Switching local sites to https can't be done simply by copying files - you need to modify the local server to do this - but only after the local sites are running correctly as VirtualHost in http mode.

See: Right-Click -> Help -> Wampserver HTTPS mode help

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.