Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am having trouble with my httpd.conf file in RedHat 7.6. I cannot get port 80 or port 443 to recognize on start up. I can get port 8080 or port 8443 to recognize after the installation of a SSL from Digicert. If someone would be so kind as to help me through this process.
This doesn't make sense to me. You say that when you set the Listen port to 8080, apache listens on 443? Do you mean that before reconfiguring the Listen port to 8080, it did not listen on 443?
By the way, it seems to me that you need two Listen directives in httpd.conf, one for 80, one for 443.
My suggestion: Go back to the previous configuration (default ports 80 and 443), and describe precisely what is wrong. E.g. you perform a certain action and get error messages, or unexpected behaviour.
Last edited by berndbausch; 03-23-2019 at 10:19 PM.
when I switch ports to port 80 this is what happens:
# systemctl start httpd.service
Enter SSL pass phrase for linuxrpms.com:443 (RSA) : **********
[root@linuxrpms conf]#
when I switch port to port 443 this is what happens:
systemctl start httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
Mar 23 23:12:40 linuxrpms.com httpd[21451]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
Mar 23 23:12:40 linuxrpms.com httpd[21451]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443
Mar 23 23:12:40 linuxrpms.com httpd[21451]: no listening sockets available, shutting down
Mar 23 23:12:40 linuxrpms.com httpd[21451]: AH00015: Unable to open logs
Mar 23 23:12:40 linuxrpms.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 23 23:12:40 linuxrpms.com kill[21456]: kill: cannot find process ""
Mar 23 23:12:40 linuxrpms.com systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 23 23:12:40 linuxrpms.com systemd[1]: Failed to start The Apache HTTP Server.
Mar 23 23:12:40 linuxrpms.com systemd[1]: Unit httpd.service entered failed state.
Mar 23 23:12:40 linuxrpms.com systemd[1]: httpd.service failed.
digging deeper with journalctl -xe
# journalctl -xe
Mar 23 23:14:41 linuxrpms.com sshd[26802]: Failed password for root from 112.85.42.232 port 33011 ssh2
Mar 23 23:14:41 linuxrpms.com sshd[26805]: Failed password for root from 112.85.42.232 port 12561 ssh2
Mar 23 23:14:41 linuxrpms.com unix_chkpwd[26936]: password check failed for user (root)
Mar 23 23:14:41 linuxrpms.com sshd[26800]: pam_succeed_if(sshd:auth): requirement "uid >= 500" not met by user "root"
Mar 23 23:14:41 linuxrpms.com unix_chkpwd[26937]: password check failed for user (root)
Mar 23 23:14:41 linuxrpms.com sshd[26802]: pam_succeed_if(sshd:auth): requirement "uid >= 500" not met by user "root"
Mar 23 23:14:41 linuxrpms.com unix_chkpwd[26938]: password check failed for user (root)
Mar 23 23:14:41 linuxrpms.com sshd[26805]: pam_succeed_if(sshd:auth): requirement "uid >= 500" not met by user "root"
Mar 23 23:14:43 linuxrpms.com sshd[26800]: Failed password for root from 112.85.42.232 port 51075 ssh2
Mar 23 23:14:43 linuxrpms.com sshd[26802]: Failed password for root from 112.85.42.232 port 33011 ssh2
Mar 23 23:14:43 linuxrpms.com sshd[26805]: Failed password for root from 112.85.42.232 port 12561 ssh2
Mar 23 23:14:44 linuxrpms.com unix_chkpwd[27032]: password check failed for user (root)
Mar 23 23:14:44 linuxrpms.com sshd[26800]: pam_succeed_if(sshd:auth): requirement "uid >= 500" not met by user "root"
Mar 23 23:14:44 linuxrpms.com unix_chkpwd[27039]: password check failed for user (root)
Mar 23 23:14:44 linuxrpms.com sshd[26802]: pam_succeed_if(sshd:auth): requirement "uid >= 500" not met by user "root"
Mar 23 23:14:44 linuxrpms.com unix_chkpwd[27047]: password check failed for user (root)
Mar 23 23:14:44 linuxrpms.com sshd[26805]: pam_succeed_if(sshd:auth): requirement "uid >= 500" not met by user "root"
Mar 23 23:14:45 linuxrpms.com sshd[26800]: Failed password for root from 112.85.42.232 port 51075 ssh2
Mar 23 23:14:45 linuxrpms.com sshd[26802]: Failed password for root from 112.85.42.232 port 33011 ssh2
Mar 23 23:14:45 linuxrpms.com sshd[26805]: Failed password for root from 112.85.42.232 port 12561 ssh2
Mar 23 23:14:46 linuxrpms.com sshd[26800]: Received disconnect from 112.85.42.232 port 51075:11: [preauth]
Mar 23 23:14:46 linuxrpms.com sshd[26800]: Disconnected from 112.85.42.232 port 51075 [preauth]
Mar 23 23:14:46 linuxrpms.com sshd[26800]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=112.85.42.232 u
Mar 23 23:14:46 linuxrpms.com sshd[26802]: Received disconnect from 112.85.42.232 port 33011:11: [preauth]
Mar 23 23:14:46 linuxrpms.com sshd[26802]: Disconnected from 112.85.42.232 port 33011 [preauth]
Mar 23 23:14:46 linuxrpms.com sshd[26802]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=112.85.42.232 u
Mar 23 23:14:46 linuxrpms.com sshd[26805]: Received disconnect from 112.85.42.232 port 12561:11: [preauth]
Mar 23 23:14:46 linuxrpms.com sshd[26805]: Disconnected from 112.85.42.232 port 12561 [preauth]
Mar 23 23:14:46 linuxrpms.com sshd[26805]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=112.85.42.232 u
Mar 23 23:14:48 linuxrpms.com unix_chkpwd[27245]: password check failed for user (root)
Mar 23 23:14:48 linuxrpms.com sshd[27159]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=182.106
Mar 23 23:14:48 linuxrpms.com sshd[27159]: pam_succeed_if(sshd:auth): requirement "uid >= 500" not met by user "root"
Mar 23 23:14:50 linuxrpms.com sshd[27159]: Failed password for root from 182.106.191.39 port 61117 ssh2
Mar 23 23:14:51 linuxrpms.com sshd[27159]: Received disconnect from 182.106.191.39 port 61117:11: Bye Bye [preauth]
Mar 23 23:14:51 linuxrpms.com sshd[27159]: Disconnected from 182.106.191.39 port 61117 [preauth]
Request: It would really make the text more readable if you put it into code tags.
Hint: You can see all httpd log messages with journalctl -u httpd.
Guess: When you try to start a web server, another one is still running, causing the address in use error. Don’t use systemctl start, but systemctl restart or even reload. Or explicitly stop the server systemctl stop before starting it.
Last edited by berndbausch; 03-24-2019 at 02:11 AM.
There are two "Listen 443" directives, so apache tries to open the same port a second time and it complains.
Please notice that there is the file /etc/httpd/conf.d/ssl.conf that is included by default in the main /etc/httpd/conf/httpd.conf, where you should configure everything regarding SSL.
In that file there is a "Listen 443" directive too.
So move the SSL configuration from the main /etc/httpd/conf/httpd.conf to /etc/httpd/conf.d/ssl.conf and you'll be ok.
To view your firewall rules. It should be somewhat intuitive. Most of the command line switches should be somewhat intuitive based on their arguments. When a packet matches -j ACCEPT, -j REJECT or -j DROP processing will stop and the -j action will be performed.
Where is the Firefox browser; local machine or different?
After changing to port 443, stop/start httpd. Then look at "netstat -tanpl|grep httpd" output.
Also, try "telnet localhost 443"
If that connects, your httpd config is working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.