LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-25-2018, 02:13 PM   #1
LawsonRL
LQ Newbie
 
Registered: Jun 2018
Posts: 22

Rep: Reputation: Disabled
SuSE Leap 15 virtual Apache2 install error


Trying to load Apache2 virtual hosting on openSuSE 15 - 64.* Issue is that the system complains that there is a configuration error based on an invalid command being used.* Here is the error message, which will be followed by the configuration files that were used. Cannot see an error since it is a copy from the link below.

Configuration information based on configuration described for Apache2 in SLES 10 https://www.novell.com/coolsolutions...e/19856.html#c

command rcapache2 restart gives error code and failure shown after status command is given:
ELIweb:/etc/apache2 # systemctl status apache2.service
● apache2.service - The Apache Webserver
** Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; vendor preset: disabled)
** Active: failed (Result: exit-code) since Fri 2018-08-24 22:47:44 EDT; 7min ago
* Process: 3183 ExecStart=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
*Main PID: 3183 (code=exited, status=1/FAILURE)

Aug 24 22:47:44 ELIweb systemd[1]: Starting The Apache Webserver...
Aug 24 22:47:44 ELIweb start_apache2[3183]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/list>
Aug 24 22:47:44 ELIweb start_apache2[3183]: AH00526: Syntax error on line 97 of /etc/apache2/vhosts.d/eliflorida.conf:
Aug 24 22:47:44 ELIweb start_apache2[3183]: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server co>
Aug 24 22:47:44 ELIweb systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 22:47:44 ELIweb systemd[1]: Failed to start The Apache Webserver.
Aug 24 22:47:44 ELIweb systemd[1]: apache2.service: Unit entered failed state.
Aug 24 22:47:44 ELIweb systemd[1]: apache2.service: Failed with result 'exit-code'.


Pertinent sections of eliflorida.conf follows:

<VirtualHost 192.168.1.60:80>
*** # ServerAdmin webmaster@eliflorida.com
*** ServerName www.eliflorida.com
*
# This should be changed to whatever you set DocumentRoot to.
*** #
*** <Directory "/srv/www/eliflorida">
*************** Order allow, deny <<< This is line 97
*************** Allow from all
</VirtualHost>

Pertinent sections of eliohiohio.conf follows:

<VirtualHost 192.168.1.60:80>
*** # ServerAdmin webmaster@eliohio.com
*** ServerName www.eliohio.com

# This should be changed to whatever you set DocumentRoot to.
*** #
*** <Directory "/srv/www/eliohio">
*************** Order allow, deny <<< This is line 97
*************** Allow from all
</VirtualHost>

Asterisks are from using a Windows editor which put them in when copied to this window. Sorry...

Last edited by LawsonRL; 08-25-2018 at 02:15 PM. Reason: asterisks not in original snip
 
Old 08-25-2018, 03:10 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,084

Rep: Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391
What did the asterisks replace? whitespace?
Presuming that they are not the cause of the problem...[You should be able to edit them out of your post...and it looks like you posted the example twice, yes?]

In apache2 Order is no longer a valid directive. It has been replaced with the Require directive.
^^ I see that Order is valid inside a Directory container. Still, the Require directive is preferred, AFAIK.

In that case, suspect it's the quotes around the path...those are not necessary.
Also, I don't see a closing to the Directory container...and I"m not sure why you have a Directory container within a VirtualHost directive:
Code:
<VirtualHost 123.45.67.89:80>  <<--IP that the webserver is listening on
ServerAdmin support@mydomain.com
DocumentRoot /var/www/httpd/mydomain
ServerName mydomain.com
ServerAlias www.mydomain.com
ErrorLog logs/mydomain-error_log
CustomLog logs/mydomain-access_log combined
</VirtualHost>

Last edited by scasey; 08-25-2018 at 03:20 PM.
 
1 members found this post helpful.
Old 08-25-2018, 03:26 PM   #3
LawsonRL
LQ Newbie
 
Registered: Jun 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Invalid directive - switching to recommended docs

Quote:
Originally Posted by scasey View Post
What did the asterisks replace? whitespace?
Presuming that they are not the cause of the problem...[You should be able to edit them out of your post...and it looks like you posted the example twice, yes?]

In apache2 Order is no longer a valid directive. It has been replaced with the Require directive.

PS. I'd find another source. I use the actual Apache documentation linked above.
Yes, the asterisks replaced white space in the selection that I copied. I edited to get comments into them using MS Wordpad. Poof! asterisks when copied to this window. They are not there in VI on Linux. The asterisks are now deleted.

I will use the docs from your link to reconfigure. There are differences in distributions , I know, but I have used Centos and SuSE before so I usually stick with them. They are also different. So I step in a hole sometimes. LOL

There are two separate configurations, both identical except for one word, the domain name - eliohio in one, and eliflorida in the other
Thanks for the reply.

Last edited by LawsonRL; 08-25-2018 at 05:53 PM. Reason: added explanatory word, deleted asterisks, domain names
 
Old 08-25-2018, 06:07 PM   #4
LawsonRL
LQ Newbie
 
Registered: Jun 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Code and reasoning behind it.

Quote: PS. I'd find another source. I use the actual Apache documentation linked above. /Quote
I cannot find the link to the Apache documentation that you refer to. Please resend.

Quote: Also, I don't see a closing to the Directory container...and I"m not sure why you have a Directory container within a VirtualHost directive: /Quote

I apparently do not understand the directory container, especially if it is your code snippet. I don't actually see it in the code. Newbie-itis apparently.

The code that i have included is essentially a copy from the documentation that I referenced, added to the files that came with the Leap 15 distribution.
 
Old 08-25-2018, 06:22 PM   #5
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,084

Rep: Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391
Quote:
Originally Posted by LawsonRL View Post
Quote: PS. I'd find another source. I use the actual Apache documentation linked above. /Quote
I cannot find the link to the Apache documentation that you refer to. Please resend.
The link is titled Require Directive in #2, but here:
https://httpd.apache.org/docs/2.4/
Quote:

Quote: Also, I don't see a closing to the Directory container...and I"m not sure why you have a Directory container within a VirtualHost directive: /Quote

I apparently do not understand the directory container, especially if it is your code snippet. I don't actually see it in the code. Newbie-itis apparently.
Yes, when I upgraded from CentOS 5.11 to 7.4, the Apache http version got upgraded to 2.4, and in that version, the Order directive is only valid within <Directory></Directory> and .htaccess files.

If your VirtualHost directories are located within the server's DocumentRoot, an additional Directory directive is not needed, as my example shows.
 
Old 08-25-2018, 06:59 PM   #6
LawsonRL
LQ Newbie
 
Registered: Jun 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
The link is titled Require Directive in #2, but here:
https://httpd.apache.org/docs/2.4/

Yes, when I upgraded from CentOS 5.11 to 7.4, the Apache http version got upgraded to 2.4, and in that version, the Order directive is only valid within <Directory></Directory> and .htaccess files.

If your VirtualHost directories are located within the server's DocumentRoot, an additional Directory directive is not needed, as my example shows.
I did see that link, but when I clicked on it I saw a bunch of "authz" and figured that the link was not what you had intended.

Your comment on the directory directive may be clue to the problem that I am having. I snipped out some stuff to attach, and I might have missed the closing directory container, but your comments about the container may be the issue. I am getting offline now because we are having a severe lightning storm. May be back later or tomorrow. I do appreciate your time. Thank you.

OK, now I see what you are talking about. The age difference between the distribution and the modifications suggested makes the difference. I have been seeing things that do not actually fit perfectly. This misfitting is why I am here asking for guidance.

Last edited by LawsonRL; 08-25-2018 at 07:03 PM. Reason: Organize page to be more readable after posting
 
Old 08-26-2018, 11:00 PM   #7
LawsonRL
LQ Newbie
 
Registered: Jun 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Reloaded system, restart configuration

Quote:
Yes, when I upgraded from CentOS 5.11 to 7.4, the Apache http version got upgraded to 2.4....
Today I decided that I had issues with my software installation, so I installed a blank hard disk and installed CentOS 7.2. Lets just say that it was not a fabulous success. I wanted an Apache server with Yast. It was a major production to do it, so I went back to SuSE Leap 15, which gave me Apache 2.4 in my download from 6/17/18. I cleaned out the network bridges and left myself a GigE and a fast Ethernet connection. These were switched from DHCP to fixed addresses that match the numbers here - .60 and .70.

Well, the install was wonderfully easy, but the system said that I had 121 updates, so I turned it loose and worked in my garage. Later I found out that the updates had failed because I apparently don't have DNS that works correctly.

I think I am supposed to close this thread because the topic has changed, but the issue of DNS is and apparently has been a big issue. However, I am will probably be able to get Apache running when I get DNS on this system because I will be using the 2.4 version with 2.4 docs.

Thanks to everyone for the help on this one. Perhaps I can clear up the network issue and maybe get Apache working from this clean install.
 
  


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: How to Install Pure-FTPd with TLS and virtual users on OpenSUSE Leap 42.1 LXer Syndicated Linux News 0 07-26-2016 10:48 PM
opensuse Leap apache2 postfix dovecot install fails "no server certificate installed" alavarre Linux - Server 1 05-13-2016 06:54 AM
Oracle Virtual Box Install openSuse Leap 42.1 rebuilder SUSE / openSUSE 1 02-06-2016 08:37 PM
Apache2 under Ubuntu - Virtual Host error on restart MJWhiteDerm Linux - Server 10 09-23-2007 08:36 PM
SuSe Apache2 error: cannot adjust 'apache2' service sir_shunt SUSE / openSUSE 14 04-18-2006 12:36 PM

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

All times are GMT -5. The time now is 12:15 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration