Hello World on AWS cloud9 - Site can't be reached using PHP inbuilt server
up vote
0
down vote
favorite
I am trying to get started with AWS Cloud9. I created a hello.php file and run the program with inbuilt PHP server which shows the following output.
As shown in the image at the bottom, it is creating a public ip for me to check the output. The ip is the same as my EC2 instance public IP as Cloud9 implicitly creates an EC2 instance if you havent created one.
When I open the page, I get a page can't be reached.
My EC2 instance is up, if anyone wondered about it. I have a feeling it has something to do with some additional settings for accessing pages dished out by servers on EC2 instance. I say this because when I create a python file with a simple print, it shows the output below but does not show the output for a hello.php webpage. What am I doing wrong?
amazon-web-services aws-cloud9
add a comment |
up vote
0
down vote
favorite
I am trying to get started with AWS Cloud9. I created a hello.php file and run the program with inbuilt PHP server which shows the following output.
As shown in the image at the bottom, it is creating a public ip for me to check the output. The ip is the same as my EC2 instance public IP as Cloud9 implicitly creates an EC2 instance if you havent created one.
When I open the page, I get a page can't be reached.
My EC2 instance is up, if anyone wondered about it. I have a feeling it has something to do with some additional settings for accessing pages dished out by servers on EC2 instance. I say this because when I create a python file with a simple print, it shows the output below but does not show the output for a hello.php webpage. What am I doing wrong?
amazon-web-services aws-cloud9
Is security group allowing in bound connection on Port 80 and also is apache installed ? Also I suggest you to hide IP and other sensitive information.
– Kush Vyas
Nov 20 at 5:47
@KushVyas - Ok I went to security Groups and added inbound rules for HTTP, HTTPS whic is port 80,443, resarted ec2 and ran the inbuilt php server again. This time it gives the issue: 3.16.156.99 refused to connect. Still not working. Thanks for the suggestion to hide ip.I should have done that but as its a learning account, I didnt.
– user2181576
Nov 20 at 9:01
can you share apache logs ?
– Kush Vyas
Nov 20 at 10:34
@KushVyas - I thought the whole idea of AWS Cloud9 was that it would automatically take care creating PHP server. I'm assuming you're asking that I enter the ec2 and check for apache logs but I run the hello.php file using a "built-in" php server. In that case, isn't it using a cloud9 runtime server (or something)?
– user2181576
Nov 20 at 11:15
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to get started with AWS Cloud9. I created a hello.php file and run the program with inbuilt PHP server which shows the following output.
As shown in the image at the bottom, it is creating a public ip for me to check the output. The ip is the same as my EC2 instance public IP as Cloud9 implicitly creates an EC2 instance if you havent created one.
When I open the page, I get a page can't be reached.
My EC2 instance is up, if anyone wondered about it. I have a feeling it has something to do with some additional settings for accessing pages dished out by servers on EC2 instance. I say this because when I create a python file with a simple print, it shows the output below but does not show the output for a hello.php webpage. What am I doing wrong?
amazon-web-services aws-cloud9
I am trying to get started with AWS Cloud9. I created a hello.php file and run the program with inbuilt PHP server which shows the following output.
As shown in the image at the bottom, it is creating a public ip for me to check the output. The ip is the same as my EC2 instance public IP as Cloud9 implicitly creates an EC2 instance if you havent created one.
When I open the page, I get a page can't be reached.
My EC2 instance is up, if anyone wondered about it. I have a feeling it has something to do with some additional settings for accessing pages dished out by servers on EC2 instance. I say this because when I create a python file with a simple print, it shows the output below but does not show the output for a hello.php webpage. What am I doing wrong?
amazon-web-services aws-cloud9
amazon-web-services aws-cloud9
edited Nov 20 at 5:32
asked Nov 20 at 5:20
user2181576
1216
1216
Is security group allowing in bound connection on Port 80 and also is apache installed ? Also I suggest you to hide IP and other sensitive information.
– Kush Vyas
Nov 20 at 5:47
@KushVyas - Ok I went to security Groups and added inbound rules for HTTP, HTTPS whic is port 80,443, resarted ec2 and ran the inbuilt php server again. This time it gives the issue: 3.16.156.99 refused to connect. Still not working. Thanks for the suggestion to hide ip.I should have done that but as its a learning account, I didnt.
– user2181576
Nov 20 at 9:01
can you share apache logs ?
– Kush Vyas
Nov 20 at 10:34
@KushVyas - I thought the whole idea of AWS Cloud9 was that it would automatically take care creating PHP server. I'm assuming you're asking that I enter the ec2 and check for apache logs but I run the hello.php file using a "built-in" php server. In that case, isn't it using a cloud9 runtime server (or something)?
– user2181576
Nov 20 at 11:15
add a comment |
Is security group allowing in bound connection on Port 80 and also is apache installed ? Also I suggest you to hide IP and other sensitive information.
– Kush Vyas
Nov 20 at 5:47
@KushVyas - Ok I went to security Groups and added inbound rules for HTTP, HTTPS whic is port 80,443, resarted ec2 and ran the inbuilt php server again. This time it gives the issue: 3.16.156.99 refused to connect. Still not working. Thanks for the suggestion to hide ip.I should have done that but as its a learning account, I didnt.
– user2181576
Nov 20 at 9:01
can you share apache logs ?
– Kush Vyas
Nov 20 at 10:34
@KushVyas - I thought the whole idea of AWS Cloud9 was that it would automatically take care creating PHP server. I'm assuming you're asking that I enter the ec2 and check for apache logs but I run the hello.php file using a "built-in" php server. In that case, isn't it using a cloud9 runtime server (or something)?
– user2181576
Nov 20 at 11:15
Is security group allowing in bound connection on Port 80 and also is apache installed ? Also I suggest you to hide IP and other sensitive information.
– Kush Vyas
Nov 20 at 5:47
Is security group allowing in bound connection on Port 80 and also is apache installed ? Also I suggest you to hide IP and other sensitive information.
– Kush Vyas
Nov 20 at 5:47
@KushVyas - Ok I went to security Groups and added inbound rules for HTTP, HTTPS whic is port 80,443, resarted ec2 and ran the inbuilt php server again. This time it gives the issue: 3.16.156.99 refused to connect. Still not working. Thanks for the suggestion to hide ip.I should have done that but as its a learning account, I didnt.
– user2181576
Nov 20 at 9:01
@KushVyas - Ok I went to security Groups and added inbound rules for HTTP, HTTPS whic is port 80,443, resarted ec2 and ran the inbuilt php server again. This time it gives the issue: 3.16.156.99 refused to connect. Still not working. Thanks for the suggestion to hide ip.I should have done that but as its a learning account, I didnt.
– user2181576
Nov 20 at 9:01
can you share apache logs ?
– Kush Vyas
Nov 20 at 10:34
can you share apache logs ?
– Kush Vyas
Nov 20 at 10:34
@KushVyas - I thought the whole idea of AWS Cloud9 was that it would automatically take care creating PHP server. I'm assuming you're asking that I enter the ec2 and check for apache logs but I run the hello.php file using a "built-in" php server. In that case, isn't it using a cloud9 runtime server (or something)?
– user2181576
Nov 20 at 11:15
@KushVyas - I thought the whole idea of AWS Cloud9 was that it would automatically take care creating PHP server. I'm assuming you're asking that I enter the ec2 and check for apache logs but I run the hello.php file using a "built-in" php server. In that case, isn't it using a cloud9 runtime server (or something)?
– user2181576
Nov 20 at 11:15
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
It seems some have not understood the question. I even got a friend offering the same solution of - check your Apache logs.
The problem was that I was using my ec2 public ip xx.xxx.xxx/hello.php to run the php file. Someone familiar with cloud9 before AWS acquired it said to look for a Preview button which was hidden in the AWS Cloud9 IDE. Its on the top when you hover the mouse and looks like this
Clicking on Preview and choosing Preview Running Application will show you the IP Cloud9 creates for you. This IP is hashed. Using this ip and adding a /hello.php did the trick.
I guess its on this URL that the built-in PHP server points to, not the public IP of the ec2 instance. That was the solution.
Thanks everyone for the help.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
It seems some have not understood the question. I even got a friend offering the same solution of - check your Apache logs.
The problem was that I was using my ec2 public ip xx.xxx.xxx/hello.php to run the php file. Someone familiar with cloud9 before AWS acquired it said to look for a Preview button which was hidden in the AWS Cloud9 IDE. Its on the top when you hover the mouse and looks like this
Clicking on Preview and choosing Preview Running Application will show you the IP Cloud9 creates for you. This IP is hashed. Using this ip and adding a /hello.php did the trick.
I guess its on this URL that the built-in PHP server points to, not the public IP of the ec2 instance. That was the solution.
Thanks everyone for the help.
add a comment |
up vote
0
down vote
accepted
It seems some have not understood the question. I even got a friend offering the same solution of - check your Apache logs.
The problem was that I was using my ec2 public ip xx.xxx.xxx/hello.php to run the php file. Someone familiar with cloud9 before AWS acquired it said to look for a Preview button which was hidden in the AWS Cloud9 IDE. Its on the top when you hover the mouse and looks like this
Clicking on Preview and choosing Preview Running Application will show you the IP Cloud9 creates for you. This IP is hashed. Using this ip and adding a /hello.php did the trick.
I guess its on this URL that the built-in PHP server points to, not the public IP of the ec2 instance. That was the solution.
Thanks everyone for the help.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
It seems some have not understood the question. I even got a friend offering the same solution of - check your Apache logs.
The problem was that I was using my ec2 public ip xx.xxx.xxx/hello.php to run the php file. Someone familiar with cloud9 before AWS acquired it said to look for a Preview button which was hidden in the AWS Cloud9 IDE. Its on the top when you hover the mouse and looks like this
Clicking on Preview and choosing Preview Running Application will show you the IP Cloud9 creates for you. This IP is hashed. Using this ip and adding a /hello.php did the trick.
I guess its on this URL that the built-in PHP server points to, not the public IP of the ec2 instance. That was the solution.
Thanks everyone for the help.
It seems some have not understood the question. I even got a friend offering the same solution of - check your Apache logs.
The problem was that I was using my ec2 public ip xx.xxx.xxx/hello.php to run the php file. Someone familiar with cloud9 before AWS acquired it said to look for a Preview button which was hidden in the AWS Cloud9 IDE. Its on the top when you hover the mouse and looks like this
Clicking on Preview and choosing Preview Running Application will show you the IP Cloud9 creates for you. This IP is hashed. Using this ip and adding a /hello.php did the trick.
I guess its on this URL that the built-in PHP server points to, not the public IP of the ec2 instance. That was the solution.
Thanks everyone for the help.
answered Nov 22 at 15:44
user2181576
1216
1216
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53386672%2fhello-world-on-aws-cloud9-site-cant-be-reached-using-php-inbuilt-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Is security group allowing in bound connection on Port 80 and also is apache installed ? Also I suggest you to hide IP and other sensitive information.
– Kush Vyas
Nov 20 at 5:47
@KushVyas - Ok I went to security Groups and added inbound rules for HTTP, HTTPS whic is port 80,443, resarted ec2 and ran the inbuilt php server again. This time it gives the issue: 3.16.156.99 refused to connect. Still not working. Thanks for the suggestion to hide ip.I should have done that but as its a learning account, I didnt.
– user2181576
Nov 20 at 9:01
can you share apache logs ?
– Kush Vyas
Nov 20 at 10:34
@KushVyas - I thought the whole idea of AWS Cloud9 was that it would automatically take care creating PHP server. I'm assuming you're asking that I enter the ec2 and check for apache logs but I run the hello.php file using a "built-in" php server. In that case, isn't it using a cloud9 runtime server (or something)?
– user2181576
Nov 20 at 11:15