2 websites on one PC
Posted by: Josh1 (---.cable.dynamic.v4.ziggo.nl)
Date: January 28, 2020 11:50PM

I want 2 webservers to run on one PC
I already have one running with wampserver and Joomla
How should I handle this?
Do I have to install a 2nd wamp server? or a 2nd Joomla installation?
All info is welcome!

Thanks!



Edited 1 time(s). Last edit at 01/28/2020 11:52PM by Josh1.

Options: ReplyQuote
Re: 2 websites on one PC
Posted by: RiggsFolly (Moderator)
Date: January 29, 2020 12:48PM

In short Add a Virtual Host sfor EACH AND EVERY ONE OF YOUR PROJECTS/SITES

Please read THE NEED for VIRTUAL HOSTS

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.19>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: 2 websites on one PC
Posted by: Josh1 (---.cable.dynamic.v4.ziggo.nl)
Date: January 29, 2020 01:04PM

so I only need to do a 2nd Joomla installation in the WWW folder of the first Joomla installation?
Then add Vhost with my new project?

Options: ReplyQuote
Re: 2 websites on one PC
Posted by: RiggsFolly (Moderator)
Date: January 29, 2020 01:18PM

No, I did say READ the post I linked to

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.19>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: 2 websites on one PC
Posted by: Otomatic (Moderator)
Date: January 29, 2020 01:22PM

Hi,

> so I only need to do a 2nd Joomla installation in the WWW folder of the first Joomla installation?
> Then add Vhost with my new project?

NO.

- 1 - The first Joomla must already be in a VirtualHost

- 2 - You must create another VirtualHost BEFORE installing the second Joomla.

Read with great care:
- The need for Virtual Host
- Wampserver 3 - Create or add a VirtualHost

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.3 32 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31 - MariaDB 10.5.5
Wampserver 3.2.3 64 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31/8.0.21 - MariaDB 10.5.5
PhPMyadmin 5.0.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
Re: 2 websites on one PC
Posted by: Josh1 (---.cable.dynamic.v4.ziggo.nl)
Date: January 31, 2020 01:26AM

Ok local it works!

Localhost/joomla (first website1)
lacalhost/joomla1 (second website)

I want to acces my websites from the internet.

My first website is acceseble from the internet, the 2nd is not.

My Vhost look like:


# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>


#
<VirtualHost *:80>
	ServerName www.mheer.com
	DocumentRoot "c:/wamp64/www/joomla"
	<Directory  "c:/wamp64/www/joomla/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require all granted
	</Directory>
</VirtualHost>

<VirtualHost *:80>
	ServerName www.josvanas.com
	DocumentRoot "c:/wamp64/www/joomla1"
	<Directory  "c:/wamp64/www/joomla1/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require all granted
	</Directory>
</VirtualHost>

Is there a Apache config Issue?

Thanks!



Edited 1 time(s). Last edit at 01/31/2020 10:05AM by RiggsFolly.

Options: ReplyQuote
Re: 2 websites on one PC
Posted by: RiggsFolly (Moderator)
Date: January 31, 2020 10:12AM

Hi,

Ok I have pinged those 2 domains and they both point to the same ip address. I am going to assume that means you have pointed the DNS at your WAN IP Address correctly.
However both pings timeout, I assume because you have turned off your PC, OR, maybe you have not Port Forwarded your Router? Have you port forwarded port 80 on your router?

The other possibility, might be you have not told your Firewall the connections are allowed into your PC on port 80?

Let me know the answers to these queries please.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.19>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: 2 websites on one PC
Posted by: Josh1 (---.cable.dynamic.v4.ziggo.nl)
Date: January 31, 2020 12:08PM

Hello

Yes my server was down.
My server is now online and working.(mheer.com is in service mode!)
Routing port 80 to my server is ok.

mheer.com is pointing to www.mheer.com (joomla project) this is OK
josvanas.com is pointing to www.josvanas.com (joomla1 project) Not OK

When i put josvanas.com in my browser i get:
Forbidden
You don't have permission to access this resource.
Apache/2.4.41 (Win64) PHP/7.3.12 Server at josvanas.com Port 80

In my Apache error log i get the massage:
[Fri Jan 31 13:36:26.932357 2020] [authz_core:error] [pid 3372:tid 1216] [client 84.30.150.107:58607] AH01630: client denied by server configuration: C:/wamp64/www/



Both domains pointing to the same (home) IP adres 84.30.150.107 is OK

In my server i want to split the 2 domains (on one server) to they own websites (jooma and joomla1) not OK

Internal..... localhost/joomla (website mheer.com is OK and working)
internal......localhost/joomla1 (new website for josvanas.com is OK and working)



Greatings!

Jos



Edited 1 time(s). Last edit at 01/31/2020 01:55PM by Josh1.

Options: ReplyQuote
Re: 2 websites on one PC
Posted by: Otomatic (Moderator)
Date: January 31, 2020 02:32PM

Hi,

> client denied by server configuration: C:/wamp64/www/

Try moving your <Directory structures out of >VirtualHost structures:
<VirtualHost *:80>
 ServerName www.mheer.com
 DocumentRoot "c:/wamp64/www/joomla"
</VirtualHost>
<Directory  "c:/wamp64/www/joomla/">
 Options +Indexes +Includes +FollowSymLinks +MultiViews
 AllowOverride All
 Require all granted
</Directory>

<VirtualHost *:80>
 ServerName www.josvanas.com
 DocumentRoot "c:/wamp64/www/joomla1"
</VirtualHost>
<Directory  "c:/wamp64/www/joomla1/">
 Options +Indexes +Includes +FollowSymLinks +MultiViews
 AllowOverride All
 Require all granted
</Directory>

> Internal..... localhost/joomla (website mheer.com is OK and working)
> internal......localhost/joomla1 (new website for josvanas.com is OK and working)

The fact that you put localhost/joomla or localhost/joomla1 is very appealing to me!

Indeed, with VirtualHosts, locally you have to launch your sites by the ServerName, for example 'http:// www.mheer.com' and not 'http://localhost/joomla/'.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.3 32 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31 - MariaDB 10.5.5
Wampserver 3.2.3 64 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31/8.0.21 - MariaDB 10.5.5
PhPMyadmin 5.0.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
Re: 2 websites on one PC
Posted by: Josh1 (---.cable.dynamic.v4.ziggo.nl)
Date: February 01, 2020 12:16AM

Hello It works!!
I had to change the Vhost file compleetly
Also placed virtual hosts in a different order

Many thanks foor al effort!!

You can check www.mheer.com and www.josvanas.com

Greatings!!

Jos

Options: ReplyQuote


Sorry, only registered users may post in this forum.