LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-28-2015, 01:55 PM   #1
tcnm
Member
 
Registered: Aug 2005
Location: Fanwood, NJ
Distribution: Ubuntu 15.10
Posts: 33

Rep: Reputation: 0
Unhappy Apache failure to connect to IP address


I installed apache 2.2.31 on linux ubuntu 15.10, Now entering the local ip address (127.0.1.1) produces the correct message "It Works", but entering my site's ip address produces only "Cannot find server at this address" Can anyone help?
 
Old 12-28-2015, 02:55 PM   #2
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by tcnm View Post
I installed apache 2.2.31 on linux ubuntu 15.10, Now entering the local ip address (127.0.1.1) produces the correct message "It Works", but entering my site's ip address produces only "Cannot find server at this address" Can anyone help?
What do you mean by "my site's ip address"? Is it the actual IP on the same machine or do you mean a site hosted elsewhere? In the first case google "apache bind address", in the second ask the admin of that server. In a shared hosting environment you usually can't access your site through the IP.
 
Old 12-28-2015, 06:33 PM   #3
tcnm
Member
 
Registered: Aug 2005
Location: Fanwood, NJ
Distribution: Ubuntu 15.10
Posts: 33

Original Poster
Rep: Reputation: 0
By my site's IP address is the IP address for the machine I am on.
Accordingly, following the advice at the site you referenced, I changed Listen 80 to Listen 71.187.235.187:80.
Now, when I try to start apache, I get the message: (99)Cannot assign requested address: make_sock: could not bind to address 71.187.235.187:80
no listening sockets available, shutting down
Unable to open logs
 
Old 12-29-2015, 07:03 AM   #4
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by tcnm View Post
By my site's IP address is the IP address for the machine I am on.
Accordingly, following the advice at the site you referenced, I changed Listen 80 to Listen 71.187.235.187:80.
Now, when I try to start apache, I get the message: (99)Cannot assign requested address: make_sock: could not bind to address 71.187.235.187:80
no listening sockets available, shutting down
Unable to open logs
Change it back to "Listen 80" and it should bind to all interfaces.

That IP looks like the external IP your ISP gives you, not your IP in your LAN. Please post the output of "ifconfig".
 
Old 12-29-2015, 11:43 AM   #5
tcnm
Member
 
Registered: Aug 2005
Location: Fanwood, NJ
Distribution: Ubuntu 15.10
Posts: 33

Original Poster
Rep: Reputation: 0
Following is the output of ifconfig:
enp0s31f6 Link encap:Ethernet HWaddr 40:8d:5c:57:b5:25
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:16 Memory:df200000-df220000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:994 errors:0 dropped:0 overruns:0 frame:0
TX packets:994 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:92551 (92.5 KB) TX bytes:92551 (92.5 KB)

wlp10s0 Link encap:Ethernet HWaddr 7c:5c:f8:19:f8:52
inet addr:192.168.1.162 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::7e5c:f8ff:fe19:f852/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6138 errors:0 dropped:0 overruns:0 frame:0
TX packets:4934 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2003620 (2.0 MB) TX bytes:1144087 (1.1 MB)


Using 192.168.1.162 produces the correct result on my machine and on another machine connected to the same router; however, although apache is running, I get no result when I enter 192.168.1.162 on another machine not connected to the same router. Note that the site "What is my IP address" says that my IP address is 71.187.235.187, which does not work even on my machine. Note also that Listen in httpd.config is set to 80.
 
Old 12-29-2015, 02:03 PM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
192.168.1.162 is not routable, it is a private address. You need to forward port 80 in your router to the machine running web server. But it will work only if your ISP is not blocking port 80.
 
Old 12-29-2015, 02:17 PM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
71.187.235.18 shows "filtered" here. Ask Verizon, they own it.
 
Old 12-29-2015, 04:07 PM   #8
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by tcnm View Post
Using 192.168.1.162 produces the correct result on my machine and on another machine connected to the same router; however, although apache is running, I get no result when I enter 192.168.1.162 on another machine not connected to the same router. Note that the site "What is my IP address" says that my IP address is 71.187.235.187, which does not work even on my machine. Note also that Listen in httpd.config is set to 80.
71.187.235.187 is the external IP of your router. To make your server accessible on port 80 from outside you need to forward port 80 to your server in your router settings. But seeing your lack of basic networking knowledge you should think twice whether you really want to do this.
 
Old 01-04-2016, 01:22 PM   #9
tcnm
Member
 
Registered: Aug 2005
Location: Fanwood, NJ
Distribution: Ubuntu 15.10
Posts: 33

Original Poster
Rep: Reputation: 0
Thank you very much horageno and Emerson. You are absolutely correct. I forwarded port 80 to my computer in my router, and I am now able to connect to my website.
 
Old 01-04-2016, 02:51 PM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
to add

is there a MUST USE/NEED!!! reason for using the older 2.2 Apache ?

the current is 2.4 and is many years NEWER
https://httpd.apache.org/docs/2.4/

and WILL be in the Ubuntu 15 repos
 
  


Reply

Tags
apache, apache2



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
[SOLVED] Can't connect to unraid webserver using name but can connect to ip address abc789987 Linux - Newbie 5 11-02-2013 04:37 AM
racoon address bind failure krishhX Linux - Security 1 03-22-2010 06:12 AM
"Deny from" IP address using http.conf (Apache 2) not blocking the IP address griffey Linux - Security 2 02-22-2008 08:32 AM
ssh failure when trying to connect jlarsen Linux - Networking 1 10-14-2006 03:06 PM
Failure to connect to some URLS Randomcasualty Linux - Networking 22 09-09-2005 03:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:58 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