homepage Welcome to WebmasterWorld Guest from 54.226.173.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Problems with Apache 2.2 to 2.4 Upgrade
Internal Server Error
BillyS




msg:4601012
 3:06 am on Aug 11, 2013 (gmt 0)

I'm trying to upgrade from apache 2.2 to 2.4. I'm using CPanel's EasyApache this round. When the upgrade completes, I get a 500 Server Error.
Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


When I look in the error log, I see the following message:

.htaccess: Either all Options must start with + or -, or no Option may

I checked the .htaccess file, and I'm wondering if the following is the problem:

Options +FollowSymLinks All -Indexes

This line is prescribed by the CMS I use and I believe G1SMD suggested this line. Unfortunately, a search reveals very little about this exact syntax.

I know I didn't change the following (my mistake)...
Order allow,deny
Deny from all

In Apache 2.4 needs to be:
Require all granted

But the error didn't indicate this as a problem

Any help is appreciated.

Bill

 

phranque




msg:4601016
 4:32 am on Aug 11, 2013 (gmt 0)

Options +FollowSymLinks All -Indexes


http://httpd.apache.org/docs/current/mod/core.html#options
The default was changed from All to FollowSymlinks in 2.3.11

Mixing Options with a + or - with those without is not valid syntax, and will be rejected during server startup by the syntax check with an abort.


this means your "+FollowSymLinks" "-Indexes" are doing nothing and your "All" is invalid syntax.
you should decide which options you want in each context and proceed from there.


make sure you are addressing all the issues listed here.
Upgrading to 2.4 from 2.2 - Apache HTTP Server:
http://httpd.apache.org/docs/current/upgrading.html [httpd.apache.org]

lucy24




msg:4601017
 4:48 am on Aug 11, 2013 (gmt 0)

Edit: phranque posted while I was typing, so we may repeat or, oops, contradict each other.

:: hasty edit here ::

.htaccess: Either all Options must start with + or -, or no Option may

I checked the .htaccess file, and I'm wondering if the following is the problem:

Options +FollowSymLinks All -Indexes

Ya think?

Use pluses and minuses to mark differences from the default. "FollowSymLinks" is included within All, so you would never need both.

Although, come to think of it... If it's your own server, why is there all that stuff in htaccess? Is it just temporary until you get the config sorted out, or are other people's sites piggybacking on your server?

I believe G1SMD suggested this line.

I don't ;)
FollowSymLinks is necessary in order to make mod_rewrite work in htaccess. But an explicit Options declaration is only necessary if it wasn't already enabled in the config file, most likely in something like <Directory /blahblah/users/>.

Mixing Options with a + or - with those without is not valid syntax, and will be rejected during server startup by the syntax check with an abort.

This line appears to be identical in 2.2 and 2.4. So anything that offends Apache 2.4 will also have offended Apache 2.2.

I know I didn't change the following (my mistake)...
Order allow,deny
Deny from all

In Apache 2.4 needs to be:
Require all granted

I don't think the two have anything to do with each other. "Order" only applies to allow vs. deny. "Require" is, hm, kinda a tangent to "Allow". (Someone else will come along shortly and use the correct technical terms.)

The default was changed from All to FollowSymlinks in 2.3.11

I like this line. (It's in the 2.4 docs under core:Options.) Well, of course they'd change the default in a version that nobody ever saw. Couldn't they just say We have changed the default?

lucy24




msg:4601018
 5:12 am on Aug 11, 2013 (gmt 0)

Intentionally separate post because I wanted a closer look at the options.

#1 "All" = everything except MultiViews = #2-6, #8. Formerly the default

#2-6, 8 Included in All, therefore formerly enabled by default, but now not:
ExecCGI
FollowSymLinks
Includes
IncludesNOEXEC
Indexes
#8 SymLinksIfOwnerMatch

#7 MultiViews NOT INCLUDED IN "all". New prose in 2.4:
This option gets ignored if set anywhere other than <Directory>, as mod_negotiation needs real resources to compare against and evaluate from.

Does that mean you can no longer enable MultiViews in htaccess?

:: detour to Apache docs to ask for clarification::

Never understood IfOwnerMatch and similarly NOEXEC. Each seems to be a restriction on a larger rule, so why is each pair syntactically parallel?

BillyS




msg:4601117
 7:56 pm on Aug 11, 2013 (gmt 0)


I believe G1SMD suggested this line.

I don't

You're right, although G1SMD did propose the default .htaccess for Joomla, it appears it's been rewritten by another party.

I read through the Apache documentation (thanks phranque) and I'm not sure why that line worked in Apache 2.2 or was even suggested by Joomla since the syntax is incorrect.

I did take a look at the httpd.conf file and I don't need Options in .htaccess (thanks Lucy24).

Up and running on Apache 2.4 since earlier today.

Thanks again - Bill

phranque




msg:4601194
 6:51 am on Aug 12, 2013 (gmt 0)

I'm not sure why that line worked in Apache 2.2



http://httpd.apache.org/docs/2.2/mod/core.html#options
Mixing Options with a + or - with those without is not valid syntax, and is likely to cause unexpected results.


vs

http://httpd.apache.org/docs/2.4/mod/core.html#options
Mixing Options with a + or - with those without is not valid syntax, and will be rejected during server startup by the syntax check with an abort.

lucy24




msg:4601200
 7:06 am on Aug 12, 2013 (gmt 0)

Ah. So they both say "Don't do it", but 2.4 is more unambiguous about the consequences. Not necessarily more severe, since Apache's "unexpected results" is the rest of the world's "unspeakable disaster" ;)

:: detour to check whether prose about using mod_rewrite inside <Files> has changed ::
Nope, still just says "unsupported", which I consider a wild exaggeration.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved