Ask Your Question
0

fedora 27 httpd 500 error

asked 2017-11-15 08:07:42 -0500

odorf314 gravatar image

Hello. I just upgraded my fedora from 26 to 27. The first thing i noticed was that my local apache server that i use for test purposes returns a 500 error.

this is the part from my httpd.conf that marks my virtualhost

<VirtualHost *:80>

  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin webmaster@domain1.com
  ServerName  social.loc
  ServerAlias social.loc


  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.php
  DocumentRoot /var/www/html/social/public_html
  <Directory "/var/www/html/social/public_html">
        Options FollowSymLinks
        AllowOverride All

        Order allow,deny
        Allow from all
    </Directory>


  # Custom log file locations
  LogLevel warn
  ErrorLog  /var/www/html/social/logs/error.log
  CustomLog /var/www/html/social/logs/access.log combined

</VirtualHost>

this is my sudo systemctl status httpd

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─php-fpm.conf
   Active: active (running) since Wed 2017-11-15 15:46:52 EET; 16min ago
     Docs: man:httpd.service(8)
 Main PID: 25238 (httpd)
   Status: "Total requests: 189; Idle/Busy workers 100/0;Requests/sec: 0.195; Bytes served/sec: 176 B/sec"
    Tasks: 214 (limit: 4915)
   CGroup: /system.slice/httpd.service
           ├─25238 /usr/sbin/httpd -DFOREGROUND
           ├─25240 /usr/sbin/httpd -DFOREGROUND
           ├─25241 /usr/sbin/httpd -DFOREGROUND
           ├─25245 /usr/sbin/httpd -DFOREGROUND
           ├─25246 /usr/sbin/httpd -DFOREGROUND
           └─25247 /usr/sbin/httpd -DFOREGROUND

Nov 15 15:46:52 localhost-localdomain systemd[1]: Starting The Apache HTTP Server...
Nov 15 15:46:52 localhost-localdomain httpd[25238]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/httpd.conf:318
Nov 15 15:46:52 localhost-localdomain httpd[25238]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::dc3a:73be:897d:78c
Nov 15 15:46:52 localhost-localdomain systemd[1]: Started The Apache HTTP Server.

and this is the last lines from error log:

[Wed Nov 15 15:46:01.665637 2017] [core:alert] [pid 22868:tid 140354590287616] [client 127.0.0.1:59752] /var/www/html/social/public_html/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Wed Nov 15 15:46:01.679234 2017] [core:alert] [pid 22870:tid 140354615301888] [client 127.0.0.1:59754] /var/www/html/social/public_html/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Wed Nov 15 15:46:01.684910 2017] [core:alert] [pid 22872:tid 140354691000064] [client 127.0.0.1:59756] /var/www/html/social/public_html/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Wed Nov 15 15:46:01.693358 2017] [core:alert] [pid 22872:tid 140354657429248] [client 127.0.0.1:59758] /var/www/html/social/public_html/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Wed Nov 15 15 ...
(more)
edit retag flag offensive close merge delete

Comments

Have you installed PHP and enabled the mod_php module?

Aeyoun gravatar imageAeyoun ( 2017-11-15 10:56:35 -0500 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2017-11-16 00:11:04 -0500

remi gravatar image

updated 2017-11-18 03:40:22 -0500

Since Fedora 27, Apache HTTP Webserver run in threaded mode (event MPM) and PHP scripts are handled via php-fpm, because mod_php is not supported for this configuration.

I have tried to summarize this changes on blog: Fedora 27: changes in httpd and php

edit flag offensive delete link more
2

answered 2017-11-15 13:24:11 -0500

masteroman gravatar image

Using php_value options in .htaccess files only works with mod_php (when you run PHP as Apache module). In cases where CGI, FastCGI, and other modes are used, you should set up directives directly in php.ini file (or in .user.ini) or in cases where suPHP is used you can specify custom php.ini file location with suPHP_ConfigPath directive.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-11-15 08:07:42 -0500

Seen: 1,077 times

Last updated: Nov 18 '17