LinuxQuestions.org
Review your favorite Linux distribution.
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 11-22-2016, 03:50 AM   #1
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Changing Listen port(s) on Apache2 on CentOS 7


This is regarding Apache2 on CentOS 7.

What must be changed outside of Apache's own configuration so that Apache2 can listen on a port other than 80 or 443?

systemd gives this information about the symptoms:

Code:
Nov 22 11:34:08 localhost.localdomain httpd[29752]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:7780
Nov 22 11:34:08 localhost.localdomain httpd[29752]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:7780
Nov 22 11:34:08 localhost.localdomain httpd[29752]: no listening sockets available, shutting down
What is the cause, SELinux maybe?

I've done a lot of searching and found only wrong and outdated information about the new extra configurations that must be done.
 
Old 11-22-2016, 05:29 AM   #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
Hi,

Most likely SELinux.
Did you try?
Code:
semanage port -a -t http_port_t -p tcp 7780
 
Old 11-22-2016, 05:35 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307

Original Poster
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Thanks. I did try that already. The program "semanage" is not part of the base installation for CentOS 7 and "yum" seems unable to tell me if it is part of any available packages. I've added the EPEL repository.

(I rarely even dabble with CentOS so it is quite unfamiliar.)
 
Old 11-22-2016, 05:44 AM   #4
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:
Originally Posted by Turbocapitalist View Post
Thanks. I did try that already. The program "semanage" is not part of the base installation for CentOS 7 and "yum" seems unable to tell me if it is part of any available packages. I've added the EPEL repository.

(I rarely even dabble with CentOS so it is quite unfamiliar.)
Then according to to this, you should run:
Code:
yum install policycoreutils-python
 
Old 11-22-2016, 05:53 AM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307

Original Poster
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Thanks. That did it.

Code:
yum install policycoreutils-python
semanage port -a -t http_port_t -p tcp 7780
And I can move forward, but for one question:


I realize that Red Hat's business model is to pile complexity after complexity onto the distro, but is there another way to find the right package name beside choosing random blogs and hoping they are right? I can't figure out a way for the package policycoreutils-python to turn up in any "yum" searches for "semanage"


Edit: yum provides semanage

Last edited by Turbocapitalist; 11-22-2016 at 05:58 AM.
 
  


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 and SSL listen only on localhost gando Linux - Software 11 05-21-2013 01:53 AM
xl2tpd on CentOS --> listen port devilboy09 Linux - Server 1 02-20-2012 01:02 AM
Warning: remote port forwarding failed for listen port 7869 windstory Linux - Newbie 1 08-02-2010 10:07 AM
MULTICAST address and port, socket listen only on port? jf.argentino Linux - Networking 2 03-09-2009 12:42 PM
Getting Apache2 to listen to port 443 only kenneho Linux - Server 3 09-13-2008 04:55 AM

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

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