Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache on Rocky Linux Installation Problems |
|
Author |
|
RodneyRecor
Joined: 25 Jan 2025 Posts: 5 Location: Paris
|
Posted: Sat 25 Jan '25 18:10 Post subject: Apache on Rocky Linux Installation Problems |
|
|
I had been running my server w/Apache since 2017
and CentOS7 <core) since it was introduced and both updated to the latest version at the end-of life. (el-19, I think)
----------
Also with:
Apache version that was current at the time.
(i'm sorry - I do not have a record of the exact version number.)
perl 5.16.3
python 2.7.5
php 5.4.45
postgresql 9.2 (al-sK)
sendmail 8.14.7
With his server I had absolutely 0-zero-0 problems of any kind over all the years, I found it to be excellent and utterly reliable 100%. But this week I thought I’d finally move to a Rocky system.
---------------------
I am currently installing
Apache 2.4.37
on Rocky 8.10
I do not yet have sendmail or postgresql installed
---------------------------------------------
I installed Rocky 9 to begin, but I had problem after problem after problem with the Apache installation. Over two full days of bitter struggling with it I could never even get httpd to start! Every start I’d get a new error message, mostly about modules that were missing, and these errors and fixes went on and on untiI had to give it up!
I've now spent over 24 hours working to install Rocky 8 instead. I figured the problems must be related to Rocky9 not being completely ready for prime time.
It all went very smoothly until I got to Apache. I reloaded all my config files from my old server and httpd was mostly starting properly and normally with just a couple of small tweaks. (I found out entirely “by mistake and luck” that I had to make SELinux “permissive” to get Apache working this far. So, I now have httpd running and restarting and starting again and again very reliably. But that’s where my joy comes to an end. Now I’m deep into problem and problem and problem with my work. I have multiple websites in place and experiencing a variety of very confusing errors.
The biggest error is that I can only see the Rocky/Apache test page on most of my domains. (I’ve currentky got 7 of them started up) On only 1 of the seven, I have “tricked” the system into presenting only a plain vanilla, insecure, temporary and incomplete website. Please see this for yourself at “bigdiscounttrains.com”.
On only one other of my 7 websites I can see some of my html files online, but not all of them, even and although all other files are in the same directory with the exact same permissions, etc. It is so far only insecure http... very temporary, incomplete and basically useless results so far. I am exasperated. Please see this for yourself at it - my personal site: “rodneyrecor.com”. You will see that Apache does not seem to be ‘reading’ or even ‘seeing’ my config files beyond the ‘sites-available’ and ‘sites-enabled’ files. None of my aliases are connecting to their targets, and my ExecCGI directives are entirely inactive and unresponsive.
If someone out there in Apacheland/Rockyland can please give me the advice and assistance to figure out and resolve these mysteries, I would be ‘give-you-my-first-born-children’ grateful for it. On another 4 websites I am only getting as far as the Rocky/Apache test page.
These are the sites: 'guestplaces-dot-net', 'indyuru-dot-net', 'eneurope-dot-net', and 'horseworlwide-dot-com'. Please take a look at these urls for yourself to see what I have so far.
If you are proficient at Rocky and Apache, and if you think you can help me, or care one bit about giving it a go, I am entirely willing to give you a sudo account on my server and let you have a good time messing around with it. (I have nothing of monstrously private or treasured data on the server that I must prevent anyone from seeing.)
fyi: (I am a veteran programmer and webmaster since the very beginning days of the internet in 1993 -yes, 32 years! - I have a degree in Computer Science and I had been a college CS professor for 2 years teaching OSs and server systems. I am nowhere near being a beginner at this, but I have NEVER encountered this kind of thing before, and I am stumped!)
Thank you! ...to anyone out there who’s willing to give me a hand with this. Please get in touch with me. Please Help!
Thank you. |
|
Back to top |
|
RodneyRecor
Joined: 25 Jan 2025 Posts: 5 Location: Paris
|
Posted: Sat 25 Jan '25 18:40 Post subject: Also... |
|
|
I forgot to mention,
I also have running:
OpenSSH 8.0p1
OpenSSL 1.1.1k fips March 2021
vstpdh
I am connecting easily and reliably and normally
with PuTTY and FileZilla.
I usually like to change the SSH port address, but when I did it yesterday, my server would not reboot, I was completely locked out of my server, and I had to start all over again. (Another wonderful, new, unexpected experience. So I am running secure on boring good-ol' port 21/22, and I wont be monkey-ing with that for now.)
-rr |
|
Back to top |
|
tangent Moderator
Joined: 16 Aug 2020 Posts: 354 Location: UK
|
Posted: Mon 27 Jan '25 21:17 Post subject: |
|
|
I too had a CentOS 7 system that I migrated to Rocky (first 8 and then 9), and currently run a Rocky 9 VM to test for potential issues that might result from platform updates.
However, I didn't experience any of the install / configuration issues you've described. Following the standard 'dnf install httpd' and intial setup, things worked as expected. It's currently running Apache 2.4.62.
Code: | [root@localhosti ~]# head -n2 /etc/os-release
NAME="Rocky Linux"
VERSION="9.5 (Blue Onyx)"
[root@localhost ~]# httpd -v
Server version: Apache/2.4.62 (Rocky Linux)
Server built: Jan 10 2025 00:00:00 |
In your post you make mention of sites-available and sites-enabled configurations, which are generally considered to be the Debian way of configuring Apache; not for generic Apache (as is the case for Rocky). To that end, the default httpd.conf file will differ substantially, as much as any included configuration files and their locations. So how did you end up with this style of configuration on a generic Apache setup (possibly ending up with a mixture of the two)?
If it were me, I'd consider a revised configuration starting from the settings in the default Rocky httpd.conf file, including additional files for your virtual host configurations as needbe, based on Apache standard documented methods, e.g. https://httpd.apache.org/docs/current/vhosts.
The other thing I'd definitely do is fully disable SELinux until I was sure things are working as expected, and only then look at turning it back on. Possibly the same with firewalld till you've decided on which ports you need open (hence your non-standard sshd port issue).
You could always post your configuration files to https://pastebin.com (base64 encode a tar file maybe), to see if any other site contributors are able to help. |
|
Back to top |
|
RodneyRecor
Joined: 25 Jan 2025 Posts: 5 Location: Paris
|
Posted: Mon 27 Jan '25 23:35 Post subject: Thanks, tangent |
|
|
Thanks for the input tangent.
I'm beginning to think that my vps company may have tampered with my OS installations. When I tried out Rocky8 and Rocky9 and CentOS7, and I ommitted the sites-available and sites-enabled files, I saw absolutely nothing on my browser. I did not even see the Apache test page. The test page only showed up after I made and installed those two files.
I've been with this vps company for seven years now without the least problem ever coming up with exactly the configuration files that I have right now. I changed nothing when this problem started. I am now in the process of changing my vps to another outfit, and although I have my heart set on using Rocky9, Im going back to Ubuntu.
And, that's part of the mystery of all this. I already DO have SELinux completely disabled, but it is still interferring with my system! |
|
Back to top |
|
tangent Moderator
Joined: 16 Aug 2020 Posts: 354 Location: UK
|
Posted: Tue 28 Jan '25 0:40 Post subject: |
|
|
I'd be very surprised if your vps company were to blame here.
The differences between Apache installations on CentOS/Rocky vs Debian (Ubuntu) are significant; compare what's below /etc/httpd vs /etc/apache2; the use of envvars with apache2ctl to control Apache on Debian, etc. I wouldn't be confident that the Apache httpd binary on Rocky would honour all the settings in a Debian based set of configuration files. Indeed, I note this comment in the Ubuntu default apache2.conf file:
# * The binary is called apache2. Due to the use of environment variables, in
# the default configuration, apache2 needs to be started/stopped with
# /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
# work with the default configuration. Hence my suggestion to significantly rework the configuration for Rocky.
Out of interest, when I've had issues with SELinux before, I chose to disable it at kernel boot level, rather than editing /etc/selinux/config, e.g.
Code: | # grubby --update-kernel ALL --args selinux=0
|
Whatever you do, let us know how you get on. |
|
Back to top |
|
RodneyRecor
Joined: 25 Jan 2025 Posts: 5 Location: Paris
|
Posted: Tue 28 Jan '25 2:30 Post subject: SELinux at System Level |
|
|
I just put your grubby line into my system.
(Thanks for it, too. I didn't kow how to do that.)
I'll let you know my results.
It's interesting that in all the "help" I got from folks on forums. not one person before yourself knew about this fix.
I am no beginner -no expert either- but I did not know how to do this. |
|
Back to top |
|
RodneyRecor
Joined: 25 Jan 2025 Posts: 5 Location: Paris
|
Posted: Tue 28 Jan '25 11:01 Post subject: Great Results! |
|
|
Tangent, Thank you.
I want you to know how grateful I am for your essential, and most importantly, accurate and knowledgeable assistance with my dilemma. I did indeed apply your grubby command to my server, getting SELinux absolutely out of my misery, and... voila! Everything began falling back into place.I've been making terrific progress re-establisking my server and websites. all my aliases and links are working again and my perl scripts are back in business.
So far I have not yet been able to restore my secure certificates. None of my webpages are secure, and linking them using the proper https prefix results in a connection failure, but I'll work on that puzzle more going forward. For now, I'm at least back online.
Please take a look for yourself at two examples: bigdiscounttrains.com and my personal site rodneyrecor.com to see my progress. ~RR |
|
Back to top |
|
|
|
|
|
|