Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - fredo

Pages: 1 2 3 [4]
46
Installation / Re: Installation over an Ec2 instance AWS
« on: May 28, 2016, 07:01:15 PM »
I wish to thank Sandeep,
for help me out with this issue!!

Regards and keep up the good work!!

47
Installation / Re: Installation over an Ec2 instance AWS
« on: May 28, 2016, 02:05:32 PM »
Hi Sandeep.

I've sent you de data you requested!
many thanks.

fredo

48
Installation / Re: Installation over an Ec2 instance AWS
« on: May 27, 2016, 09:25:10 PM »
Sure!
Thnks a lot!

EC2 server.. 2 cores 4 gb ram, 40 GB
O.S: CentOs 6.7 x64
CWP: 9.8.14

Private ip: 172.31.xx.xx
Elastic Ip: 52.40.XX.XXX

In CWP private ip mentioned above is set as Server IP.
And as a default (CWP set this automatically during install)
Elastic Ip, is set as shared ip in CWP.

I´ve set two accounts.. each one with only one domain..

domainone.com and 2nd account with domaintwo.com
 
if I browse www.domainone.com/info.php it goes ok!

if I browse www.domaintwo.com/foot.php it shows..error 404, also if I browse www.domaintwo.com/index.html error 404..
if I browse www.domaintwo.com it shows CentOs default page.. but Im sure this index.html is not from the domaintwo.com account..

but..strangest thing is.. if you go to www.domaintwo.com/info.php it shows its content!!! (but this file only exist on www.domainone.com) so how is this possible?..is this a bug?   

I guess that this is a problem with  server ip and the public ip or hsa to do with virtualHost.. but honestly I'm not shure how to fix it..

When i Created the accounts..this was shown..

# vhost_start domaintwo.com
<VirtualHost 172.31.xx.xx:80>
ServerName domaintwo.com
ServerAlias www.domaintwo.com
ServerAdmin mail@domaintwo.com
DocumentRoot "/home/usr2016/public_html"
ScriptAlias /cgi-bin/ "/home/usr2016/public_html/cgi-bin/
#
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/usr2016/domaintwo.com/*.conf

<IfModule mod_suexec.c>
        SuexecUserGroup usr2016 usr2016
</IfModule>

<IfModule mod_suphp.c>
        suPHP_UserGroup usr2016 usr2016
        suPHP_ConfigPath /home/usr2016
</IfModule>

<Directory "/home/usr016/public_html">
        AllowOverride All
</Directory>

</VirtualHost>
# vhost_end domaintwo.com

this are my cwp settings

Shared IP:   52.40.xx.xxx  (default: 172.31.xx.xxx)
Apache Port: 80 (default: 80)
Root Email:   xxxx@xxx.com
Forward root emails:
NAT Local IP: 172.31.xx.xx  Activate NAT-ed Mod: (checked)

Thank you very much for your help!!!

regards

fredo

49
Installation / Re: Installation over an Ec2 instance AWS
« on: May 27, 2016, 05:09:28 PM »
Hi Sandeep!
Thanks for answering.. we'll as I've mentioned before I've made a fresh install and yet again installed CWP..

All seemed to be fine during installation.. so, I logged into CWP, created a package, then created an user account.. I uploaded a file "info.php" within /public_html folder..

When I access through web server..I could only see CentOs webpage.. if put www.domain.com/info.php it shows error 404..
so I did what I did last time, went to CWP settings, edited settings..

Once more 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, as before.. I was able to see www.domain.com/info.php Great..

so.. I´ve created an another user account.. eg. domaintwo.com
and uploaded another file "foot.php"

When I go to www.domaintwo.com my browser shows CentOs web page.. (ok, I never erased the index.html)
but.. www.domaintwo.com/foot.php shows error 404 not found..  :-(

Logged again to that account using ftp.. erased de index.html, uploaded another index..
nothing changed :-(

I don´t get what´s wrong..
Checked httpd error log nothing is shown..
could you help me out? what do you need to ease you help?

Many thank again for your answer!!
I Love CWP.. and i´ve installed many times..but never on AWS

Regards

freddo


50
Installation / Installation over an Ec2 instance AWS
« on: May 27, 2016, 01:08:56 PM »
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




Pages: 1 2 3 [4]