Fedora-Fr - Communauté francophone Fedora - Linux

Communauté francophone des utilisateurs de la distribution Linux Fedora.

  

Dernière news : Fin de maintenance pour Fedora 32

#1 19/08/2021 18:19:10

bolivari
Membre
Lieu : Bretagne
Inscription : 14/04/2010
Messages : 126

Apache et php

Bonjour,

J'ai installé un serveur Apache et PHP avec MariaDb.

Je rencontre un problème il ne m'affiche pas le

<? phpinfo ?>

Donc mes applications PHP ne fonctionne pas.

Ca doit être un problème de configuration mais je suis en panne. Si vous pouviez m'aider à avoir php qui fonctionne avec apache?

Cordialement bolivari.

Hors ligne

#2 19/08/2021 18:20:55

bolivari
Membre
Lieu : Bretagne
Inscription : 14/04/2010
Messages : 126

Re : Apache et php

Désolé j'ai posté sur fedora 33 alors que c'est fedora 34...

Hors ligne

#3 19/08/2021 19:09:25

Nicosss
Rédacteur Wiki
Rédacteur Wiki
Lieu : Isère
Inscription : 05/03/2007
Messages : 6 674
Site Web

Re : Apache et php

Tu as suivi les différentes parties de la documentation https://doc.fedora-fr.org/wiki/LAMP ?

Le fichier contient bien

<?php phpinfo(); ?>

F34_64 Gnome-Shell - GA-990FXA-UD3 - Phenom II X6 1100T - NH-D14 - Ati HD 5750 Fanless - 16Go RAM /&/ F33_64 Gnome-Shell - Toshiba Satellite C660D-19X - 8Go RAM
F33_64 - ASRock 960GC-GS FX - AMD FX(tm)-8300 - 16Go RAM

Hors ligne

#4 19/08/2021 19:16:14

bolivari
Membre
Lieu : Bretagne
Inscription : 14/04/2010
Messages : 126

Re : Apache et php

Oui Nicosss j'ai suivi le tuto,

mais j'ai un index apache dans mon home qui fonctionne avec les html mes pas php.

Le fichier php fonctionnais sur une ancienne version de fedora.

Pour info j'ai mis setenforce a 0.

Cordialement, bolivari.

Dernière modification par bolivari (19/08/2021 19:30:11)

Hors ligne

#5 20/08/2021 12:53:35

Lyes Saadi
Un p'tit nouveau qui s'améliore :-P
Rédacteur Wiki
Lieu : 127.0.0.1
Inscription : 03/02/2018
Messages : 517
Site Web

Re : Apache et php

Existe-t-il des logs qui pourrait nous aider à diagnostiquer le problème (dans "/var/log/httpd" par exemple) ?


Ceci n'est pas une signature.
Les développeurs C++ sont des terroristes.
Et Linux est meilleur que Windows. Ce sont des faits.

Hors ligne

#6 20/08/2021 13:58:04

bolivari
Membre
Lieu : Bretagne
Inscription : 14/04/2010
Messages : 126

Re : Apache et php

Oui Lyes Saadi,

J'ai des log.

Access.log:

27.0.0.1 - - [16/Aug/2021:16:15:11 +0200] "GET /server-status HTTP/1.1" 404 196 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [16/Aug/2021:16:15:20 +0200] "GET /mail/webmail/roundcubemail HTTP/1.1" 301 252 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [16/Aug/2021:16:15:20 +0200] "GET /mail/webmail/roundcubemail/ HTTP/1.1" 200 9990 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [16/Aug/2021:16:15:34 +0200] "GET / HTTP/1.1" 200 178 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [16/Aug/2021:16:17:50 +0200] "GET /tools/server.html HTTP/1.1" 304 - "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [16/Aug/2021:16:19:25 +0200] "GET /tools/ HTTP/1.1" 403 199 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [16/Aug/2021:16:19:29 +0200] "GET /tools/ HTTP/1.1" 403 199 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [16/Aug/2021:16:19:32 +0200] "GET /tools/ HTTP/1.1" 403 199 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [16/Aug/2021:16:20:22 +0200] "GET /tools/mysqlstat.php HTTP/1.1" 200 9275 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [16/Aug/2021:16:24:55 +0200] "GET /tools/phpinfo.php HTTP/1.1" 200 25 "http://localhost/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [17/Aug/2021:15:52:14 +0200] "GET /tools/phpinfo.php HTTP/1.1" 200 25 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [17/Aug/2021:15:52:14 +0200] "GET /favicon.ico HTTP/1.1" 404 10 "http://localhost/tools/phpinfo.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [17/Aug/2021:15:52:18 +0200] "GET /app-blog/ HTTP/1.1" 200 395 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [17/Aug/2021:15:52:21 +0200] "GET /blog/wordpress HTTP/1.1" 404 196 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [17/Aug/2021:15:52:25 +0200] "GET /app-blog/wp-login.php HTTP/1.1" 200 29084 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [17/Aug/2021:15:57:11 +0200] "GET /tools/php-net-tools-v2.7.0/nettools.php HTTP/1.1" 200 30357 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [17/Aug/2021:17:21:04 +0200] "GET /tools/symlink_create.php HTTP/1.1" 200 59 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [17/Aug/2021:17:21:05 +0200] "GET /favicon.ico HTTP/1.1" 404 10 "http://localhost/tools/symlink_create.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [17/Aug/2021:17:21:17 +0200] "GET /tools/symlink_create.php HTTP/1.1" 200 59 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
127.0.0.1 - - [18/Aug/2021:15:14:04 +0200] "GET /tools/symlink_create.php HTTP/1.1" 200 59 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [18/Aug/2021:16:51:49 +0200] "GET /favicon.ico HTTP/1.1" 404 10 "http://localhost/tools/symlink_create.php" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:01:56 +0200] "GET /tools/server.html HTTP/1.1" 200 2544 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:01 +0200] "GET /blog/wordpress HTTP/1.1" 404 196 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:04 +0200] "GET /app-blog/wp-login.php HTTP/1.1" 200 29084 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:10 +0200] "GET /admin/phpMyAdmin HTTP/1.1" 301 242 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:10 +0200] "GET /admin/phpMyAdmin/ HTTP/1.1" 200 6701 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:11 +0200] "GET /admin/phpMyAdmin/navigation.php%3C?php%20echo%20$url_query;%20?%3E HTTP/1.1" 404 196 "http://localhost/admin/phpMyAdmin/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:11 +0200] "GET /admin/phpMyAdmin/%3C?php%20echo%20$main_target;%20?%3E HTTP/1.1" 404 196 "http://localhost/admin/phpMyAdmin/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:11 +0200] "GET /admin/phpMyAdmin/navigation.php%3C?php%20echo%20$url_query;%20?%3E HTTP/1.1" 404 196 "http://localhost/admin/phpMyAdmin/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:11 +0200] "GET /admin/phpMyAdmin/favicon.ico HTTP/1.1" 200 18902 "http://localhost/admin/phpMyAdmin/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:15 +0200] "GET /mail/webmail/horde-webmail HTTP/1.1" 301 252 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:15 +0200] "GET /mail/webmail/horde-webmail/ HTTP/1.1" 200 3907 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:23 +0200] "GET /e-commerce/magento HTTP/1.1" 301 244 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:12:02:23 +0200] "GET /e-commerce/magento/ HTTP/1.1" 200 2571 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:19:18:30 +0200] "GET /tools/server.html HTTP/1.1" 304 - "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:21:24:45 +0200] "GET /tools/server.html HTTP/1.1" 200 2544 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:21:24:45 +0200] "GET /favicon.ico HTTP/1.1" 404 10 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:21:24:49 +0200] "GET /tools/browser.php HTTP/1.1" 200 2201 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [19/Aug/2021:21:24:57 +0200] "GET /tools/phpinfo.php HTTP/1.1" 200 25 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
127.0.0.1 - - [20/Aug/2021:11:40:09 +0200] "GET /app-blog/ HTTP/1.1" 200 395 "http://localhost/tools/server.html" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"

Error.log:

H00558: httpd: Could not reliably determine the server's fully qualified domain name, using ngc-5908.localdomain. Set the 'ServerName' directive globally to suppress this message
[Thu Aug 19 19:18:25.089488 2021] [lbmethod_heartbeat:notice] [pid 1217941:tid 1217941] AH02282: No slotmem from mod_heartmonitor
[Thu Aug 19 19:18:25.092292 2021] [mpm_event:notice] [pid 1217941:tid 1217941] AH00489: Apache/2.4.48 (Fedora) configured -- resuming normal operations
[Thu Aug 19 19:18:25.092327 2021] [core:notice] [pid 1217941:tid 1217941] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Thu Aug 19 19:18:25.124334 2021] [:warn] [pid 2918788:tid 2918788] ./mod_dnssd.c: No services found to register
[Thu Aug 19 19:18:26.098051 2021] [mpm_event:warn] [pid 1217941:tid 1217941] AH00488: long lost child came home! (pid 2918788)
[Thu Aug 19 21:24:38.408065 2021] [mpm_event:notice] [pid 1217941:tid 1217941] AH00493: SIGUSR1 received.  Doing graceful restart
[Thu Aug 19 21:24:38.424427 2021] [so:warn] [pid 1217941:tid 1217941] AH01574: module dnssd_module is already loaded, skipping
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ngc-5908.localdomain. Set the 'ServerName' directive globally to suppress this message
[Thu Aug 19 21:24:38.426383 2021] [lbmethod_heartbeat:notice] [pid 1217941:tid 1217941] AH02282: No slotmem from mod_heartmonitor
[Thu Aug 19 21:24:38.428311 2021] [mpm_event:notice] [pid 1217941:tid 1217941] AH00489: Apache/2.4.48 (Fedora) configured -- resuming normal operations
[Thu Aug 19 21:24:38.428332 2021] [core:notice] [pid 1217941:tid 1217941] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Thu Aug 19 21:24:38.432270 2021] [:warn] [pid 2995960:tid 2995960] ./mod_dnssd.c: No services found to register
[Thu Aug 19 21:24:39.432698 2021] [mpm_event:warn] [pid 1217941:tid 1217941] AH00488: long lost child came home! (pid 2995960)

Voila en espérant que vous pourrais m'aider.

Cordialement, bolivari.

Hors ligne

#7 27/08/2021 15:25:42

bolivari
Membre
Lieu : Bretagne
Inscription : 14/04/2010
Messages : 126

Re : Apache et php

Bonjour,


Personne n'as d'idées?

Je n'arrive toujours pas a avoir php sur apache et je sais si cela vient de la config php ou apache.

Existe t'il un log pour php?

Cordialement , bolivari

Dernière modification par bolivari (27/08/2021 15:26:40)

Hors ligne

#8 27/08/2021 19:47:00

Nicosss
Rédacteur Wiki
Rédacteur Wiki
Lieu : Isère
Inscription : 05/03/2007
Messages : 6 674
Site Web

Re : Apache et php

Tous tes sites qui tournent fonctionnent ?

Dernière modification par Nicosss (27/08/2021 19:47:25)


F34_64 Gnome-Shell - GA-990FXA-UD3 - Phenom II X6 1100T - NH-D14 - Ati HD 5750 Fanless - 16Go RAM /&/ F33_64 Gnome-Shell - Toshiba Satellite C660D-19X - 8Go RAM
F33_64 - ASRock 960GC-GS FX - AMD FX(tm)-8300 - 16Go RAM

Hors ligne

#9 28/08/2021 09:40:14

bolivari
Membre
Lieu : Bretagne
Inscription : 14/04/2010
Messages : 126

Re : Apache et php

Non aucun, apache ne me sert que du html pas de php.

le httpd.conf:

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# See the httpd.conf(5) man page for more information on this configuration,
# and httpd.service(8) on using and configuring the httpd service.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/etc/httpd"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin root@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.
#
<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/sites"

#
# Relax access to content within /var/www.
#
<Directory "/var/www/">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>

# Further relax access to the default document root:
<Directory "/var/www/sites/">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<Files ".ht*">
    Require all denied
</Files>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    #CustomLog "logs/access_log" common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    CustomLog "logs/access_log" combined
</IfModule>

<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server's namespace, but do not anymore. The client 
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts. 
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

</IfModule>

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /etc/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType text/html .php .phps
</IfModule>

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the 
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8

<IfModule mime_magic_module>
    #
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type.  The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #
    MIMEMagicFile conf/magic
</IfModule>

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it, 
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted 
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults if commented: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
EnableSendfile on

# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf

Le php.conf:

#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
AddType application/x-httpd-php-source .phps

Dernière modification par bolivari (28/08/2021 10:40:57)

Hors ligne

#10 28/08/2021 11:28:25

Nicosss
Rédacteur Wiki
Rédacteur Wiki
Lieu : Isère
Inscription : 05/03/2007
Messages : 6 674
Site Web

Re : Apache et php

Que retourne

$ systemctl status php-fpm.service

Pour rappel, il ne faut pas toucher aux fichiers /etc/httpd/conf/httpd.conf et /etc/php.ini.


F34_64 Gnome-Shell - GA-990FXA-UD3 - Phenom II X6 1100T - NH-D14 - Ati HD 5750 Fanless - 16Go RAM /&/ F33_64 Gnome-Shell - Toshiba Satellite C660D-19X - 8Go RAM
F33_64 - ASRock 960GC-GS FX - AMD FX(tm)-8300 - 16Go RAM

Hors ligne

#11 28/08/2021 17:34:44

bolivari
Membre
Lieu : Bretagne
Inscription : 14/04/2010
Messages : 126

Re : Apache et php

Bonjour Nicosss,

$ systemctl status php-fpm.service

retourne:

● php-fpm.service - The PHP FastCGI Process Manager
     Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
     Active: active (running) since Fri 2021-08-27 16:10:26 CEST; 24h ago
   Main PID: 1181 (php-fpm)
     Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec"
      Tasks: 6 (limit: 18915)
     Memory: 29.4M
        CPU: 3.157s
     CGroup: /system.slice/php-fpm.service
             ├─1181 php-fpm: master process (/etc/php-fpm.conf)
             ├─1399 php-fpm: pool www
             ├─1400 php-fpm: pool www
             ├─1401 php-fpm: pool www
             ├─1402 php-fpm: pool www
             └─1403 php-fpm: pool www

août 27 16:10:17 ngc-5908.localdomain systemd[1]: Starting The PHP FastCGI Process Manager...
août 27 16:10:26 ngc-5908.localdomain systemd[1]: Started The PHP FastCGI Process Manager.

Tout as l'air normal.

J'avoue que suis un peut perdu c'est la premiere fois que je rencontre ce problème de configuration. hmm

Hors ligne

#12 28/08/2021 17:59:00

Nicosss
Rédacteur Wiki
Rédacteur Wiki
Lieu : Isère
Inscription : 05/03/2007
Messages : 6 674
Site Web

Re : Apache et php

Tu dis avoir suivi les différentes documentations https://doc.fedora-fr.org/wiki/LAMP mais à quel moment tu as fait des écarts ?


F34_64 Gnome-Shell - GA-990FXA-UD3 - Phenom II X6 1100T - NH-D14 - Ati HD 5750 Fanless - 16Go RAM /&/ F33_64 Gnome-Shell - Toshiba Satellite C660D-19X - 8Go RAM
F33_64 - ASRock 960GC-GS FX - AMD FX(tm)-8300 - 16Go RAM

Hors ligne

#13 28/08/2021 18:14:45

bolivari
Membre
Lieu : Bretagne
Inscription : 14/04/2010
Messages : 126

Re : Apache et php

Oui j'ai fais le tuto même si je connaissait avant.

Franchement j'ai tous restauré par défault et un peut customiser...

Mais je n'arrive pas as avoir la page d’accueil fedora comme avant.

Hors ligne

#14 28/08/2021 18:41:05

Nicosss
Rédacteur Wiki
Rédacteur Wiki
Lieu : Isère
Inscription : 05/03/2007
Messages : 6 674
Site Web

Re : Apache et php

Désolé, on s'est loupé sur le salon. N'hésite pas à passer à nouveau et attendre un peu plus.

Voilà c'est le côté customisation qu'il va falloir voir smile


F34_64 Gnome-Shell - GA-990FXA-UD3 - Phenom II X6 1100T - NH-D14 - Ati HD 5750 Fanless - 16Go RAM /&/ F33_64 Gnome-Shell - Toshiba Satellite C660D-19X - 8Go RAM
F33_64 - ASRock 960GC-GS FX - AMD FX(tm)-8300 - 16Go RAM

Hors ligne

Pied de page des forums