Hi!
I finally decided to try AWS Ec2 instances.. and now Im ready to install CWP on it.. but as I made my first fresh install over a CentOs 6.7 y found out two issues..
1st AWS gave 2 ips.. a public and a private..
2nd all my domain pages are showing the default CentOs page..
(i realized that because I´ve created two users with two domains Ex. (domain1.com and domain2.com) in each I´ve created an a.php file which only has on the first domain an echo "hello world"; the 2nd a.php (which is located at domain2.com) has only a phpinfo()
of course the 1st thing I thought.. was..ok, both domain has the same index.html but if try
www.domain1.com/a.php should show me the echo, or the phpinfo if it was
www.domain2.com/a.php...
unfortunatelly in my case showed a 404 error..
so, searching over here someone said that in those cases that:
"In some cases this issue is caused by the private or NAT-ed network and then you will need to use a private IP address which is configured on your server.
Amazon S3 and Microsoft Azure are know to have this kind of setup.
Fast Fix
– You need to enable NAT-ed network and enter your private IP by going to:
Left-Menu –> CWP-Settings –> Edit Settings
– You need to rebuild Virtual Hosts from CWP.
You can check the IP’s configured on your server by using a shell command."
So I did that.. went to Left menu, ->CWP settings-> edit settings..
i left the shared IP (public ip) where it says Shared ip:
and in nat local ip I put the private ip that AWS gave me which is the same that CWP shows as Server IP.
y also selected the Activate NAT-ed Mod:
Saved it..
then I rebuild Apache Vhosts..
and then I was able to access the domains or so I thought..
now if I try
www.domain1.com/a.php it shows me the echo..
but if I try
www.domain2.com/a.php instead of showing me the phpinfo();..it also shows me the echo !!! who could that be possible? is this a bug? or am I doing something wrong?
Anyway.. I´ve tried to fix it my self.. but I´ve made a mess.. so I decided to start all over again..I terminated the instance and now Im ready to start all over, but before doing that, could anybody help me to figure out if I did something wrong?
Many thanks!!
Freddo