LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-04-2022, 03:43 PM   #1
baldur2630
Member
 
Registered: Jan 2007
Location: Belgium
Distribution: CentOS & Ubuntu
Posts: 173

Rep: Reputation: 22
Unhappy Problems with Virtual Servers on Apache - Centos 8 (and Rocky)


I have Centos 7 - Trying to move everything into something newer but having nightmares.

I already have a threas about samba, now I have a problem with Apache Virtual servers.

On Centos 7 I had the Virtual server file in http/conf.d

<VirtualHost *:80>
ServerName server1.mydomain-FQDN
DocumentRoot /var/www/server1
RewriteEngine On
RewriteRule ^(/server1/.*) /www/server1$1

ServerAdmin my email address
ServerAlias server1
ErrorLog /var/log/httpd/server1-error_log
TransferLog /var/log/httpd/server1-access_log
DirectoryIndex index.php
</VirtualHost>

It ran perfectly since CentOS 7 was released. It doesn't work on Centos 8.
I search the HowTo sites. Tried 3 with three different setups. NONE work

The last one I tried was this

<virtualhost *:80>
ServerName server1.mydomain-FQDN
ServerAlias www.server1.mydomain-FQDN
DocumentRoot /var/www/server1.mydomain-FQDN
ErrorLog /var/log/httpd/server1.mydomain-FQDN-error.log
CustomLog /var/log/httpd/server1.mydomain-FQDN-access.log combined
</virtualhost>

I don't want an html sub directory after /var/www but I followed the instructions THAT doesn't work.

I had to create new folders sites-available and sites enabled and put the server1.conf file in there, followed by creating symbolic links. Just a waste of time, but I tried it. DOESN'T work.

I've come to the conclusion that all the help files on the web are just there to confuse the hell out of people.

Can anyone help me to get this working I host 3 virtual sites on this server. I installed Rocky, but it has all the same bugs and I tried all the above on Rocky as well. Same story.

Both CentOS 8 and Rocky don't retain the screen resolution. Down the server, bring it back upo and we are back to 800x600 again

I'm on the point of staying with CentOS 7, seems Red Hat lost it after that. Not surprisong people stick on shitty Windows.
 
Old 07-05-2022, 02:18 PM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,340

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
I think there was an update to the apache server used on CentOS and those updates may have changed the config file syntax or locations.

On my fedora workstation the apache2 config is in /etc/httpd/conf for the main server config and in /etc/httpd/conf.d for the config related to each virtual server domain you set up.

How that specifically relates to what you see with CentOS 7 to 8 upgrade I don't know, but as you seem already aware Rocky or Alma seems to be the replacement(s) for CentOS 8 so I would suggest you look at what has changed from 7 and work with that going forward.

Remember that windows locks you into doing things their way and linux allows you to tailor things to fit what you feel is best. Complaining when things change gains nothing except angst for you and venting to us which is irritating.

Providing the details of how you are attempting to fix things and what exactly is not working gives us the info needed to assist. Venting does not.

What exactly is the document root for the virtual machine? On Fedora the main server has /var/www and the actual documents served are under /var/www/html since there is also a /var/www/cgi-bin directory to allow the server to access the binaries there to manipulate the data. Each virtual server has its own path to the document root so they can provide independent services to clients.

For example, main server would use /var/www while server1 would use /var/www1, server2 would use /var/www2, etc. Each would have its own /var/www?/html and /var/www?/cgi-bin directories to keep the data separate. YMMV depending upon the needs and sites.

Last edited by computersavvy; 07-05-2022 at 02:33 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Alma and Rocky Linux release 8.5 builds, Rocky catches up with secure boot LXer Syndicated Linux News 0 11-17-2021 11:15 AM
LXer: How To Migrate CentOS 7 To AlmaLinux 8, CentOS 8, Oracle Linux 8, Rocky Linux 8 Using ELevate LXer Syndicated Linux News 0 11-01-2021 04:52 PM
LXer: How to Configure Apache Virtual Hosts on Rocky Linux LXer Syndicated Linux News 0 08-09-2021 04:03 AM
LXer: Rocky Linux, CentOS Founder’s AWS-Sponsored CentOS Stand-in, Stresses Extensibility LXer Syndicated Linux News 0 06-04-2021 03:09 PM
[SOLVED] Apache Virtual Servers (CentOS 5.5) dstu Linux - Software 7 09-21-2010 04:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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