LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-17-2015, 10:05 PM   #1
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Rep: Reputation: Disabled
Question regarding AWS instance


hello gentlemen,
I have an issue regarding my AWS Instance. I have installed Centos 6.5 on my instance. I can ping my instance public address,but i cant connect trough browser. example, when I put my Instance public address at browser it will not show running apache. I already install it. is it my httpd.conf is wrongly configured? help me
 
Old 09-18-2015, 09:03 AM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
OK, this will sound dumb however before you start, make sure you have an instance of httpd (apache web server) running
#sudo apachectl status
is one way to check that. You can also replace "status" with "start" if "status" isn't configured in your mods. If it's already running, apachectl start gives you an "already loaded" error.

If the server is running, it has to be configured to listen to a port on a specific IP address, the default is port 80 on "localhost", if I recall.
Localhost isn't a public internet address, it's a local shortcut for unix pipes (mostly) so you can't browse a server that's monitoring the IP 'localhost' except from the server upon which the Apache instance resides (Where the address 'locahost' is actually...um...local).
The easiest test I can think of is secure shell to your web server and try
#curl -XGET localhost:80
If you get a response, your server is pointed at 'localhost', go into your httpd.conf and replace that with the public IP you're trying to listen on.
If you don't get a response... post back, we'll try something else.
 
Old 09-18-2015, 11:21 AM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Is port 80 open in the Security Group assigned to the instance?
 
Old 09-21-2015, 04:18 AM   #4
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
i've got this message.

# curl -XGET localhost:80
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Index of /</title>
</head>
<body>
<h1>Index of /</h1>
<table><tr><th><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr></th></tr>
<tr><td valign="top"><img src="/icons/image2.gif" alt="[IMG]"></td><td><a href="favicon.ico">favicon.ico</a></td><td align="right">18-Sep-2015 03:26 </td><td align="right"> 1 </td><td>&nbsp;</td></tr>
<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="perf.php">perf.php</a></td><td align="right">18-Sep-2015 03:07 </td><td align="right"> 45K</td><td>&nbsp;</td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="phpMyAdmin/">phpMyAdmin/</a></td><td align="right">06-Mar-2014 20:34 </td><td align="right"> - </td><td>&nbsp;</td></tr>
<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="phpinfo.php">phpinfo.php</a></td><td align="right">18-Sep-2015 03:56 </td><td align="right"> 21 </td><td>&nbsp;</td></tr>
<tr><th colspan="5"><hr></th></tr>
</table>
</body></html>

Hi,i've got this message.Is it already connected?
Thanks
 
Old 09-21-2015, 04:20 AM   #5
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dijetlo View Post
OK, this will sound dumb however before you start, make sure you have an instance of httpd (apache web server) running
#sudo apachectl status
is one way to check that. You can also replace "status" with "start" if "status" isn't configured in your mods. If it's already running, apachectl start gives you an "already loaded" error.

If the server is running, it has to be configured to listen to a port on a specific IP address, the default is port 80 on "localhost", if I recall.
Localhost isn't a public internet address, it's a local shortcut for unix pipes (mostly) so you can't browse a server that's monitoring the IP 'localhost' except from the server upon which the Apache instance resides (Where the address 'locahost' is actually...um...local).
The easiest test I can think of is secure shell to your web server and try
#curl -XGET localhost:80
If you get a response, your server is pointed at 'localhost', go into your httpd.conf and replace that with the public IP you're trying to listen on.
If you don't get a response... post back, we'll try something else.
# curl -XGET localhost:80
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Index of /</title>
</head>
<body>
<h1>Index of /</h1>
<table><tr><th><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr></th></tr>
<tr><td valign="top"><img src="/icons/image2.gif" alt="[IMG]"></td><td><a href="favicon.ico">favicon.ico</a></td><td align="right">18-Sep-2015 03:26 </td><td align="right"> 1 </td><td>&nbsp;</td></tr>
<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="perf.php">perf.php</a></td><td align="right">18-Sep-2015 03:07 </td><td align="right"> 45K</td><td>&nbsp;</td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="phpMyAdmin/">phpMyAdmin/</a></td><td align="right">06-Mar-2014 20:34 </td><td align="right"> - </td><td>&nbsp;</td></tr>
<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="phpinfo.php">phpinfo.php</a></td><td align="right">18-Sep-2015 03:56 </td><td align="right"> 21 </td><td>&nbsp;</td></tr>
<tr><th colspan="5"><hr></th></tr>
</table>
</body></html>

I've got this message. Is it connected?
Thanks sir
 
Old 09-22-2015, 07:58 AM   #6
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
I've got this message. Is it connected?
Yup
If you see "<html>" in the response, you're talking to a web server (most likely).
To read the output, it looks like you already have a service using port 80 on your instance....
Quote:
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="phpMyAdmin/">phpMyAdmin/</a></td><td align="right">06-Mar-2014 20:34 </td><td align="right"> - </td><td>&nbsp;</td></tr>
What else might you have installed that's providing a link to phpMyAdmin on your webserver?If you are able, from the instance, try to open a browser and point it at localhost port 80
 
Old 09-25-2015, 04:29 AM   #7
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,714
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
telnet is a nice connection testing tool. can you connect to port 80 of the public address of your instance.

if that fails see post #3 by Habitual, above.
 
Old 09-29-2015, 01:34 AM   #8
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Is port 80 open in the Security Group assigned to the instance?
sorry for the late reply because of poor connection.

I already assign http port which is 80 to anywhere IP (0.0.0.0).
but my instance's IP still cannot response in browser.
 
Old 09-29-2015, 07:22 AM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Ooh, I wouldn't use 0.0.0.0/32 until after testing and host security has been evaluated.
Best assign your home IP there, unless it's dynamic?
 
Old 10-01-2015, 01:45 AM   #10
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Ooh, I wouldn't use 0.0.0.0/32 until after testing and host security has been evaluated.
Best assign your home IP there, unless it's dynamic?
Thank you for helping. It works for me right now.
 
Old 10-16-2015, 05:26 AM   #11
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Regarding scp command

how to copy the directory from remote host to another remote host. If im using filezilla it would be take much time.
here a situation. i need to copy directory from server 1.1.1.1 to another server 2.2.2.2. please help me.
 
Old 10-16-2015, 06:42 AM   #12
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by ilovecentos View Post
how to copy the directory from remote host to another remote host. If im using filezilla it would be take much time.
here a situation. i need to copy directory from server 1.1.1.1 to another server 2.2.2.2. please help me.
This is a different question. Create a new thread for it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot connect to AWS from pc stu7 Linux - Networking 2 05-26-2015 09:10 AM
[SOLVED] script for AWS Skaperen Linux - Virtualization and Cloud 2 03-25-2015 05:05 AM
Installing Synchronet and Apache on AWS Micro Instance - Advice? 809areacode Linux - Server 0 12-01-2012 08:45 PM
[SOLVED] Switch to instance instead of creating a new instance of a program javascriptninja Linux - Newbie 8 01-28-2012 03:39 PM
Amazon AWS windows instance backups linuxlover.chaitanya General 0 05-17-2011 12:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration