Message erreur 403 fordidden

Bonjour

Le problème est que depuis la réinstallation de apache2 avec httpd que je n’accède plus a “mon_site/info.php & phpmyadmin” avec le message “403 fordidden” mais j’accède bien a internet

J’ai regarder sur différents forum mais ne trouve pas la solution

Merci pour votre aide

Cordialement

Quelle version de Debian ?
Quelle config Apache ?
Quels sont les droits sur les fichiers et autres répertoires liés au site web posant pb ?

Voici les infos :

version debian :

Linux  3.16.0-4-686-pae #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) i686 GNU/Linux
8.6

config Apache :

## # hints.
## #
## #
## # Summary of how the Apache 2 configuration works in Debian:
## # The Apache 2 web server configuration in Debian is quite different to
## # upstream's suggested way to configure the web server. This is because Debian's
## # default Apache2 installation attempts to make adding and removing modules,
## # virtual hosts, and extra configuration directives as flexible as possible, in
## # order to make automating the changes and administering the server as easy as
## # possible.

## # It is split into several files forming the configuration hierarchy outlined
## # below, all located in the /etc/apache2/ directory:
## #
## #    /etc/apache2/
## #    |-- apache2.conf
## #    |    `--  ports.conf
## #    |-- mods-enabled
## #    |    |-- *.load
## #    |    `-- *.conf
## #    |-- conf-enabled
## #    |    `-- *.conf
## #     `-- sites-enabled
## #         `-- *.conf
## #
## #
## # * apache2.conf is the main configuration file (this file). It puts the pieces
## #   together by including all remaining configuration files when starting up the
## #   web server.
## #
## # * ports.conf is always included from the main configuration file. It is
## #   supposed to determine listening ports for incoming connections which can be
## #   customized anytime.
## #
## # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
## #   directories contain particular configuration snippets which manage modules,
## #   global configuration fragments, or virtual host configurations,
## #   respectively.
## #
## #   They are activated by symlinking available configuration files from their
## #   respective *-available/ counterparts. These should be managed by using our
## #   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
## #   their respective man pages for detailed information.
## #
## # * The binary is called apache2. Due to the use of environment variables, in
## #   the default configuration, apache2 needs to be started/stopped with
## #   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
## #   work with the default configuration.


## # Global configuration
## #

## #
## # ServerRoot: The top of the directory tree under which the server's
## # configuration, error, and log files are kept.
## #
## # NOTE!  If you intend to place this on an NFS (or otherwise network)
## # mounted filesystem then please read the Mutex documentation (available
## # at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
## # you will save yourself a lot of trouble.
## #
## # Do NOT add a slash at the end of the directory path.
## #
## #ServerRoot "/etc/apache2"

## #
## # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
## #
## Mutex file:${APACHE_LOCK_DIR} default

## #
## # PidFile: The file in which the server should record its process
## # identification number when it starts.
## # This needs to be set in /etc/apache2/envvars
## #
## PidFile ${APACHE_PID_FILE}

## #
## # Timeout: The number of seconds before receives and sends time out.
## #
## Timeout 300

## #
## # KeepAlive: Whether or not to allow persistent connections (more than
## # one request per connection). Set to "Off" to deactivate.
## #
## KeepAlive On

## #
## # MaxKeepAliveRequests: The maximum number of requests to allow
## # during a persistent connection. Set to 0 to allow an unlimited amount.
## # We recommend you leave this number high, for maximum performance.
## #
## MaxKeepAliveRequests 100

## #
## # KeepAliveTimeout: Number of seconds to wait for the next request from the
## # same client on the same connection.
## #
## KeepAliveTimeout 5


## # These need to be set in /etc/apache2/envvars
## User ${APACHE_RUN_USER}
## Group ${APACHE_RUN_GROUP}

## #
## # HostnameLookups: Log the names of clients or just their IP addresses
## # e.g., www.apache.org (on) or 204.62.129.132 (off).
## # The default is off because it'd be overall better for the net if people
## # had to knowingly turn this feature on, since enabling it means that
## # each client request will result in AT LEAST one lookup request to the
## # nameserver.
## #
## HostnameLookups Off

## # 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 ${APACHE_LOG_DIR}/error.log

## #
## # LogLevel: Control the severity of messages logged to the error_log.
## # Available values: trace8, ..., trace1, debug, info, notice, warn,
## # error, crit, alert, emerg.
## # It is also possible to configure the log level for particular modules, e.g.
## # "LogLevel info ssl:warn"
## #
## LogLevel warn

## # Include module configuration:
## IncludeOptional mods-enabled/*.load
## IncludeOptional mods-enabled/*.conf

## # Include list of ports to listen on
## Include ports.conf


## # Sets the default security model of the Apache2 HTTPD server. It does
## # not allow access to the root filesystem outside of /usr/share and /var/www.
## # The former is used by web applications packaged in Debian,
## # the latter may be used for local directories served by the web server. If
## # your system is serving content from a sub-directory in /srv you must allow
## # access here, or in any related virtual host.
## <Directory />
##     Options FollowSymLinks
##     AllowOverride All
##     Require all denied
## </Directory>

## <Directory /usr/share/>
##     AllowOverride All
##     Require all granted
## </Directory>

## <Directory /var/www/>
##     Options Indexes FollowSymLinks
##     AllowOverride All
##     Require all granted
## </Directory>

## <Directory /srv/>
##     Options Indexes FollowSymLinks
##     AllowOverride All
##     Require all granted
## </Directory>




## # AccessFileName: The name of the file to look for in each directory
## # for additional configuration directives.  See also the AllowOverride
## # directive.
## #
## AccessFileName .htaccess

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


## #
## # The following directives define some format nicknames for use with
## # a CustomLog directive.
## #
## # These deviate from the Common Log Format definitions in that they use %O
## # (the actual bytes sent including headers) instead of %b (the size of the
## # requested file), because the latter makes it impossible to detect partial
## # requests.
## #
## # Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
## # Use mod_remoteip instead.
## #
## LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
## LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
## LogFormat "%h %l %u %t \"%r\" %>s %O" common
## LogFormat "%{Referer}i -> %U" referer
## LogFormat "%{User-agent}i" agent

## # Include of directories ignores editors' and dpkg's backup files,
## # see README.Debian for details.

## # Include generic snippets of statements
## IncludeOptional conf-enabled/*.conf

## # Include the virtual host configurations:
## IncludeOptional sites-enabled/*.conf

fichiers et autres répertoires liés:

-rw-r--r-- 1 root root     0 juin  10 19:52 mysql
-rw-r--r-- 1 root root 10701 oct.  26 20:26 verif_apache.html

drwxrwxrwx  3 www-data www-data  4096 oct.  26 20:23 www

drwxrwxrwx 5 www-data www-data 4096 oct.  26 20:32 html

lrwxrwxrwx 1 root     root       21 oct.  26 20:23 phpmyadmin -> /usr/share/phpmyadm

Bonjour

Je me suis permis de modifier la présentation de certains blocs de texte de ton message précédent.

Merci :slight_smile:

ajoute

Include /etc/phpmyadmin/apache.conf

dans ton fichier /etc/apache2/apache2.conf

et redemarre apache avant d’essayer d’accéder à ton url

Bonsoir Minus & merci

Malheureusement cela ne fonctionne pas :frowning:

Salut :slight_smile:

Serait-il possible d’avoir le vhost de ton site ?

/etc/apache2/site-enabled/tonsite.conf ?
y a t’il un Require ou un Allow from qui s’y cacherait ?

et le /etc/phpmyadmin/apache.conf ?

Que disent les access log ?
(oui oui y a des 403 mais y a t’il un message plus explicite ?)
/var/log/apache2/access.log ou tonsite_access.log (dépend de la conf de ton vhost).

Merci :slight_smile:

ps :

grep -v ^# /etc/apache2/apache2.conf :slight_smile: ce sera plus lisible :slight_smile:

as-tu installé le paquet php5 et libapache2-mod-php5 ?
dpkg -l |grep php5
dpkg -l |grep libapache2-mod-php5

Bonjour Nux_o & merci :smiley:

/etc/apache2/site-enabled/tonsite.conf

`<VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet`

/etc/phpmyadmin/apache.conf

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
    Options FollowSymLinks
    DirectoryIndex index.php

    <IfModule mod_php5.c>
        <IfModule mod_mime.c>
            AddType application/x-httpd-php .php
        </IfModule>
        <FilesMatch ".+\.php$">
            SetHandler application/x-httpd-php
        </FilesMatch>

        php_flag magic_quotes_gpc Off
        php_flag track_vars On
        php_flag register_globals Off
        php_admin_flag allow_url_fopen Off
        php_value include_path .
        php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
        php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/
    </IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authz_core.c>
        <IfModule mod_authn_file.c>
            AuthType Basic
            AuthName "phpMyAdmin Setup"
            AuthUserFile /etc/phpmyadmin/htpasswd.setup
        </IfModule>
        Require valid-user
    </IfModule>
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
    Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
    Require all denied
</Directory>

/var/log/apache2/access.log : fichier vide!

grep -v ^# /etc/apache2/apache2.conf

Mutex file:${APACHE_LOCK_DIR} default

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5


User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

Include ports.conf


<Directory />
	Options FollowSymLinks
	AllowOverride All
	Require all denied
</Directory>

<Directory /usr/share/>
	AllowOverride All
	Require all granted
</Directory>

<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride All
	Require all granted
</Directory>

<Directory /srv/>
	Options Indexes FollowSymLinks
	AllowOverride All
	Require all granted
</Directory>




AccessFileName .htaccess

<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>


LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent


IncludeOptional conf-enabled/*.conf

IncludeOptional sites-enabled/*.conf
Include /etc/phpmyadmin/apache.conf

dpkg -l |grep php5

ii  libapache2-mod-php5                   5.6.27+dfsg-0+deb8u1                 i386         server-side, HTML-embedded scripting language (Apache 2 module)
ii  php5                                  5.6.27+dfsg-0+deb8u1                 all          server-side, HTML-embedded scripting language (metapackage)
ii  php5-apcu                             4.0.7-1                              i386         APC User Cache for PHP 5
ii  php5-cgi                              5.6.27+dfsg-0+deb8u1                 i386         server-side, HTML-embedded scripting language (CGI binary)
ii  php5-cli                              5.6.27+dfsg-0+deb8u1                 i386         command-line interpreter for the php5 scripting language
ii  php5-common                           5.6.27+dfsg-0+deb8u1                 i386         Common files for packages built from the php5 source
ii  php5-curl                             5.6.27+dfsg-0+deb8u1                 i386         CURL module for php5
ii  php5-gd                               5.6.27+dfsg-0+deb8u1                 i386         GD module for php5
ii  php5-imagick                          3.2.0~rc1-1                          i386         Provides a wrapper to the ImageMagick library
ii  php5-imap                             5.6.27+dfsg-0+deb8u1                 i386         IMAP module for php5
ii  php5-intl                             5.6.27+dfsg-0+deb8u1                 i386         internationalisation module for php5
ii  php5-json                             1.3.6-1                              i386         JSON module for php5
rc  php5-ldap                             5.6.27+dfsg-0+deb8u1                 i386         LDAP module for php5
ii  php5-mcrypt                           5.6.27+dfsg-0+deb8u1                 i386         MCrypt module for php5
ii  php5-memcache                         3.0.8-5                              i386         memcache extension module for PHP5
ii  php5-mysqlnd                          5.6.27+dfsg-0+deb8u1                 i386         MySQL module for php5 (Native Driver)
ii  php5-pspell                           5.6.27+dfsg-0+deb8u1                 i386         pspell module for php5
ii  php5-readline                         5.6.27+dfsg-0+deb8u1                 i386         Readline module for php5
ii  php5-recode                           5.6.27+dfsg-0+deb8u1                 i386         recode module for php5
ii  php5-snmp                             5.6.27+dfsg-0+deb8u1                 i386         SNMP module for php5
ii  php5-sqlite                           5.6.27+dfsg-0+deb8u1                 i386         SQLite module for php5
ii  php5-tidy                             5.6.27+dfsg-0+deb8u1                 i386         tidy module for php5
ii  php5-xmlrpc                           5.6.27+dfsg-0+deb8u1                 i386         XML-RPC module for php5
ii  php5-xsl                              5.6.27+dfsg-0+deb8u1                 i386         XSL module for php

dpkg -l |grep libapache2-mod-php5

ii libapache2-mod-php5 5.6.27+dfsg-0+deb8u1 i386 server-side, HTML-embedded scripting language (Apache 2 module)

1 -

ls -l de ce répertoire .

2 - Le vhost de ton site est celui par défaut ?! je me trompe ?

3 - as-tu, à chaque modification de la conf, reloadé Apache ? (systemctl reload apache ou /etc/init.d/apache2 reload ?)

1 - /usr/share/phpmyadmin

total 680
-rw-r--r--  1 root root  1569 juil. 23 11:25 browse_foreigners.php
-rw-r--r--  1 root root  4829 juil. 23 11:25 changelog.php
-rw-r--r--  1 root root   308 juil. 23 11:25 chk_rel.php
-rw-r--r--  1 root root  4437 juil. 23 11:25 config.sample.inc.php
-rw-r--r--  1 root root  4178 juil. 23 11:25 db_create.php
-rw-r--r--  1 root root  8870 juil. 23 11:25 db_datadict.php
-rw-r--r--  1 root root   401 juil. 23 11:25 db_events.php
-rw-r--r--  1 root root  2788 juil. 23 11:25 db_export.php
-rw-r--r--  1 root root   505 juil. 23 11:25 db_import.php
-rw-r--r--  1 root root  9295 juil. 23 11:25 db_operations.php
-rw-r--r--  1 root root  5269 juil. 23 11:25 db_printview.php
-rw-r--r--  1 root root  4004 juil. 23 11:25 db_qbe.php
-rw-r--r--  1 root root   454 juil. 23 11:25 db_routines.php
-rw-r--r--  1 root root  1843 juil. 23 11:25 db_search.php
-rw-r--r--  1 root root   872 juil. 23 11:25 db_sql.php
-rw-r--r--  1 root root 13408 juil. 23 11:25 db_structure.php
-rw-r--r--  1 root root  8273 juil. 23 11:25 db_tracking.php
-rw-r--r--  1 root root   364 juil. 23 11:25 db_triggers.php
drwxr-xr-x  2 root root  4096 déc.   8  2015 docs
-rw-r--r--  1 root root  3123 juil. 23 11:25 error_report.php
-rw-r--r--  1 root root 15078 juil. 23 11:25 export.php
-rw-r--r--  1 root root 18902 juil. 23 11:25 favicon.ico
-rw-r--r--  1 root root  2265 juil. 24 14:29 file_echo.php
-rw-r--r--  1 root root 15702 juil. 23 11:25 gis_data_editor.php
-rw-r--r--  1 root root 22201 juil. 23 11:25 import.php
-rw-r--r--  1 root root  2862 juil. 23 11:25 import_status.php
-rw-r--r--  1 root root 20036 juil. 23 11:25 index.php
drwxr-xr-x  9 root root 12288 oct.  26 19:20 js
drwxr-xr-x 13 root root 28672 oct.  26 19:20 libraries
-rw-r--r--  1 root root   728 juil. 23 11:25 license.php
drwxr-xr-x 43 root root  4096 déc.   8  2015 locale
-rw-r--r--  1 root root  1988 juil. 23 11:25 navigation.php
-rw-r--r--  1 root root   389 juil. 23 11:25 phpinfo.php
-rw-r--r--  1 root root   772 juil. 23 11:25 phpmyadmin.css.php
-rw-r--r--  1 root root  2083 juil. 23 11:25 pmd_display_field.php
-rw-r--r--  1 root root 37686 juil. 23 11:25 pmd_general.php
-rw-r--r--  1 root root  5104 juil. 23 11:25 pmd_pdf.php
-rw-r--r--  1 root root  4562 juil. 23 11:25 pmd_relation_new.php
-rw-r--r--  1 root root  2195 juil. 23 11:25 pmd_relation_upd.php
-rw-r--r--  1 root root  2565 juil. 23 11:25 pmd_save_pos.php
-rw-r--r--  1 root root  2595 juil. 23 11:25 prefs_forms.php
-rw-r--r--  1 root root 13207 juil. 23 11:25 prefs_manage.php
-rw-r--r--  1 root root  1213 juil. 23 11:20 print.css
-rw-r--r--  1 root root  6222 juil. 23 11:25 querywindow.php
-rw-r--r--  1 root root  4004 juil. 23 11:25 schema_edit.php
-rw-r--r--  1 root root  1734 juil. 23 11:25 schema_export.php
-rw-r--r--  1 root root  1061 juil. 23 11:25 server_binlog.php
-rw-r--r--  1 root root   735 juil. 23 11:25 server_collations.php
-rw-r--r--  1 root root  2634 juil. 23 11:25 server_databases.php
-rw-r--r--  1 root root   615 juil. 23 11:25 server_engines.php
-rw-r--r--  1 root root   698 juil. 23 11:25 server_export.php
-rw-r--r--  1 root root   452 juil. 23 11:25 server_import.php
-rw-r--r--  1 root root  1465 juil. 23 11:25 server_plugins.php
-rw-r--r--  1 root root 12118 juil. 23 11:25 server_privileges.php
-rw-r--r--  1 root root  2054 juil. 23 11:25 server_replication.php
-rw-r--r--  1 root root   577 juil. 23 11:25 server_sql.php
-rw-r--r--  1 root root   889 juil. 23 11:25 server_status_advisor.php
-rw-r--r--  1 root root  3490 juil. 23 11:25 server_status_monitor.php
-rw-r--r--  1 root root  1369 juil. 23 11:25 server_status.php
-rw-r--r--  1 root root  1663 juil. 23 11:25 server_status_queries.php
-rw-r--r--  1 root root  1507 juil. 23 11:25 server_status_variables.php
-rw-r--r--  1 root root  1790 juil. 23 11:25 server_user_groups.php
-rw-r--r--  1 root root  1283 juil. 23 11:25 server_variables.php
drwxr-xr-x  4 root root  4096 oct.  26 19:20 setup
-rw-r--r--  1 root root  1039 juil. 23 11:25 show_config_errors.php
-rw-r--r--  1 root root  5587 juil. 23 11:25 sql.php
-rw-r--r--  1 root root  3475 juil. 23 11:25 tbl_addfield.php
-rw-r--r--  1 root root  5883 juil. 23 11:25 tbl_change.php
-rw-r--r--  1 root root  4126 juil. 23 11:25 tbl_chart.php
-rw-r--r--  1 root root  2756 juil. 23 11:25 tbl_create.php
-rw-r--r--  1 root root  3782 juil. 23 11:25 tbl_export.php
-rw-r--r--  1 root root  1658 juil. 23 11:25 tbl_find_replace.php
-rw-r--r--  1 root root  1334 juil. 23 11:25 tbl_get_field.php
-rw-r--r--  1 root root  3452 juil. 23 11:25 tbl_gis_visualization.php
-rw-r--r--  1 root root   589 juil. 23 11:25 tbl_import.php
-rw-r--r--  1 root root  1205 juil. 23 11:25 tbl_indexes.php
-rw-r--r--  1 root root  2828 juil. 23 11:25 tbl_move_copy.php
-rw-r--r--  1 root root 12472 juil. 23 11:25 tbl_operations.php
-rw-r--r--  1 root root  1474 juil. 23 11:25 tbl_printview.php
-rw-r--r--  1 root root  4680 juil. 23 11:25 tbl_relation.php
-rw-r--r--  1 root root 13526 juil. 23 11:25 tbl_replace.php
-rw-r--r--  1 root root  3883 juil. 24 14:29 tbl_row_action.php
-rw-r--r--  1 root root  2228 juil. 23 11:25 tbl_select.php
-rw-r--r--  1 root root  1014 juil. 23 11:25 tbl_sql.php
-rw-r--r--  1 root root  4577 juil. 23 11:25 tbl_structure.php
-rw-r--r--  1 root root  3927 juil. 23 11:25 tbl_tracking.php
-rw-r--r--  1 root root   144 juil. 23 11:25 tbl_triggers.php
-rw-r--r--  1 root root  5975 juil. 24 14:29 tbl_zoom_select.php
drwxr-xr-x  4 root root  4096 oct.  26 19:20 themes
-rw-r--r--  1 root root   863 juil. 23 11:25 themes.php
-rw-r--r--  1 root root  1347 juil. 23 11:25 transformation_overview.php
-rw-r--r--  1 root root  3961 juil. 23 11:25 transformation_wrapper.php
-rw-r--r--  1 root root  1176 juil. 24 14:29 url.php
-rw-r--r--  1 root root  7020 juil. 23 11:25 user_password.php
-rw-r--r--  1 root root   550 juil. 23 11:25 version_check.php
-rw-r--r--  1 root root  8914 juil. 23 11:25 view_create.php
-rw-r--r--  1 root root  3614 juil. 23 11:25 view_operations.php
-rw-r--r--  1 root root  1128 juil. 23 11:25 webapp.php

2 - Le vhost de ton site est celui par défaut ?
Oui, pour info , je ne sais pas si cela peux aider, le serveur est monter via une VM dans un LAN en IP fixe

3 - as-tu, à chaque modification de la conf, reloadé Apache ? (systemctl reload apache ou /etc/init.d/apache2 reload ?)

/etc/init.d/apache2 reload
[…] Reloading apache2 configuration (via systemctl): apache2.serviceJob for apache2.service failed. See ‘systemctl status apache2.service’ and ‘journalctl -xn’ for details.
failed!

systemctl reload apache
Failed to reload apache.service: Unit apache.service failed to load: No such file or directory.

Si je fait : # service apache2 restart pas de message d’erreur

Salut.

Depuis Apache 2.4.x il faut ajouter à tes directory de VH Require all granted par exemple.

CF : https://httpd.apache.org/docs/2.4/fr/howto/access.html

Cordialement,
Romain

Merci ZW3B

Je le met dans quel fichier ?

Salut Boulette :slight_smile:

Il faut mettre les require dans les directory (style racine au moins).

Pour ton phpMyAdmin le fichier se trouve /etc/phpmyadmin/apache.conf comme tu vient de nous le dire :wink:

Par exemple :

                Require all granted
                Options MultiViews FollowSymLinks
                AllowOverride All AuthConfig
                Order allow,deny
                Allow from all

Il faut même enlever les + ou - de(s) options depuis la 2.4 :slight_smile:

Cordialement,
Romain

Voici mon fichier

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
 Require all granted
                Options MultiViews FollowSymLinks
                AllowOverride All AuthConfig
                Order allow,deny
                Allow from all
    Options FollowSymLinks
    DirectoryIndex index.php

    <IfModule mod_php5.c>
        <IfModule mod_mime.c>
            AddType application/x-httpd-php .php
        </IfModule>
        <FilesMatch ".+\.php$">
            SetHandler application/x-httpd-php
        </FilesMatch>

        php_flag magic_quotes_gpc Off
        php_flag track_vars On
        php_flag register_globals Off
        php_admin_flag allow_url_fopen Off
        php_value include_path .
        php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
        php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/
    </IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authz_core.c>
        <IfModule mod_authn_file.c>
            AuthType Basic
            AuthName "phpMyAdmin Setup"
            AuthUserFile /etc/phpmyadmin/htpasswd.setup
        </IfModule>
        Require valid-user
    </IfModule>
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
    Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
    Require all denied
</Directory>

Toujours le problème apres redémarrage du serveur et toujours FAILED pour restart Apache

Il faut même enlever les + ou - de(s) options depuis la 2.4 --> c’est à dire ?

Require all granted est déja présent dans le apache2.conf pour /usr/share…

par contre :
-rw-r–r-- 1 root root 20036 juil. 23 11:25 index.php

ce n’est pas normal.

un
chown -R www-data:www-data /usr/share/phpmyadmin

serait sympathique :slight_smile:

alors ça marche ?

remet le apache.conf comme il était avant.

Allow n’est plus supporté pour 2.4 et > (à vrai dire normalement oui mais le Require a remplacé le Allow.)

Il ne fallait rien changer à ta conf, elle était bonne :stuck_out_tongue:

remet comme avant et fait un reload… le probleme se situait (du moins) au niveau des droits des fichiers de /phpmyadmin.

1 J'aime

Ta conf est erronée :confused:

Le Require remplace le Allow…

Allow pour les < à 2.4 et Require 2.4 et >.
La doc le dit clairement :slight_smile:
ici, on a affaire à un 2.4, donc > Require.

Il est inutile de surcharger avec un Require granted all cr le apache2.conf dans /etc :

<Directory /usr/share/>
	AllowOverride All
	Require all granted
</Directory>

Tu surcharge si tu ne veux qu’autoriser en local ou pour une IP particulière.

:slight_smile:

yo…

J’ai loupé ton erreur de reload… pas bon !

apache2ctl -t donne quoi ?

1 J'aime
# apache2ctl -t
AH00526: Syntax error on line 175 of /etc/apache2/apache2.conf:
<RequireAll not allowed here
Action '-t' failed.
The Apache error log may have more information.