LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-08-2016, 08:59 AM   #1
fedix
Member
 
Registered: Oct 2005
Location: Mpumalanga, South Africa
Distribution: Fedora / CentOS 5 / Ubuntu
Posts: 104

Rep: Reputation: 17
Access to Apache web server from network client


Why can't I access my web server from another machine on the local network.

I've changed the httpd.conf to allow access from the network to port 80; but still no access. Interestingly though, I can access the webserver:631 (cups) as well as any other port (for example an alfresco install on port 8080), but not the default port 80.

Thanks!
 
Old 03-08-2016, 03:49 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Perhaps a firewall problem. Run
Code:
iptables -nvL|grep 80
to see if post 80 is open on your firewall

You can also run
Code:
netstat -tanpl|grep 80
to verify that apache is listening on its public IP too.

Regards
 
Old 03-11-2016, 01:57 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
router settings?
 
Old 03-11-2016, 09:05 AM   #4
fedix
Member
 
Registered: Oct 2005
Location: Mpumalanga, South Africa
Distribution: Fedora / CentOS 5 / Ubuntu
Posts: 104

Original Poster
Rep: Reputation: 17
OK, thanks. It seems as if my iptables does not allow port 80. But according to firewall-config on the "services" tab, it looks like port 80 is indeed open?

How can I open port 80?

Thanks!
 
Old 03-13-2016, 04:17 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
How can I open port 80?
It depends on your distro.
So use your favorite search engine and look for it

Regards
 
Old 03-13-2016, 08:54 AM   #6
fedix
Member
 
Registered: Oct 2005
Location: Mpumalanga, South Africa
Distribution: Fedora / CentOS 5 / Ubuntu
Posts: 104

Original Poster
Rep: Reputation: 17
My distro is Fedora 23. I've been searching and made all kinds of changes through firewall-config, command line etc. Still no access.

This is the output of iptables -nvL|grep 80

Quote:
445 78042 ACCEPT udp -- * * 0.0.0.0/0 224.0.0.251 udp dpt:5353 ctstate NEW
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:80 ctstate NEW
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 ctstate NEW
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:80 ctstate NEW
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 ctstate NEW
[root@fedora23 htdocs]#
Help please.
 
Old 03-13-2016, 04:21 PM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Looks like the port 80/tcp is open already. Perhaps you need to delete the 2 occurrence of the iptalbes rule (and the 80/udp)
I don't use Fedora, so better read the official documentation of firewalld
For quick instructions check this

Regards
 
Old 03-13-2016, 11:37 PM   #8
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Code:
firewall-cmd --add-service http
Add the --permanent option to persist over restarts.
Once the port is open in firewalld, you do need something listening on port 80, usually the httpd server.
 
Old 03-14-2016, 09:22 AM   #9
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Rep: Reputation: 72
And maybe you need to expound on the "I can't access" problem. Maybe the "webserver" listening on port 80 is not booted up? Or maybe it's up and firewalld allows connection but SELinux doesn't allow it?
Code:
semanage port -l | grep http_port_t
 
  


Reply



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
Apache2 - how to allow multiple client IP to access web server with different DocRoot Black187 Linux - Server 5 12-03-2013 10:23 AM
Apache Web Server - access from the www vesta41 Linux - Software 8 01-07-2004 06:55 PM
Can't access Linux web server web pages from LAN client jaydave Linux - Networking 4 03-16-2003 02:38 AM
Unable to access to a website on apache web server bisbane General 3 07-10-2001 11:03 AM
remote access to a website on apache web server bisbane Linux - Newbie 0 07-09-2001 06:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:52 AM.

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