logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#1 13-03-2023 16:02:25

doli8888
Membre
Lieu : 07110 VINEZAC
Distrib. : Debian Bullseye
Noyau : Linux 6.1.0-0.deb11.11-amd64
(G)UI : kwin
Inscription : 09-07-2019
Site Web

[RESOLU] apache2 : The requested URL was not found on this server

salut

je veux installer un site en local dans le répertoire /var/www/dolibar01

 chown www-data:www-data -R dolibarr01
chmod 755 dolibarr01
 


<VirtualHost *:80>

#ServerName yourdomain.com
ServerName dolibarr01.localhost

DocumentRoot /var/www/dolibarr01/htdocs/

<Directory /var/www/dolibarr01/htdocs>
#prends en compte htAcces
#AllowOverride All

Options +FollowSymLinks
Require all granted
</Directory>

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

</VirtualHost>


dans apache2.conf je n'ai rien ajouté pour ce site:

# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# 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

#
# The directory where shm and other runtime files will be stored.
#

DefaultRuntimeDir ${APACHE_RUN_DIR}

#
# 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 None
  Require all denied
</Directory>

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

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


<Directory /var/www/html/dolibarr>
#affichage du contenu repertoire impossible
#mais sous répertoire OUI => htaccess
  Options Indexes
#lien symbolique pris en charge
  Options FollowSymLinks
# prise en compte de htaccess
  AllowOverride All
</Directory>

 
#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# 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

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

#rajout manuel le 12/03/2023
ServerName 127.0.0.1
 


/etc/hosts

# Host addresses
127.0.0.1  localhost
127.0.0.1  dolibarr
127.0.0.1  dolibarr01
127.0.1.1  KuJL
::1        localhost ip6-localhost ip6-loopback
ff02::1    ip6-allnodes
ff02::2    ip6-allrouters



mais quand je lance l'installation de dolibarr

http://localhost/dolibarr01/htdocs/install/index.php

il y'a l'erreur 

The requested URL was not found on this server



j'ai essayé de voir httpd.conf mais il n'est pas sur mon système !

J'ai un autre dolibarr sur /var/www/html/dolibarr et ce site fonctionne correctement ?

Le fait mettre le deuxième dolibarr dans /var/www bloque son exécution ?

Dernière modification par doli8888 (13-03-2023 20:38:34)


Debian GNU/Linux 11  64-bit     Noyau : 6.1.0-0.deb11.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4~bpo11+1 (2023-08-08) x86_64 GNU/Linux                                                 
KDE Plasma 5.20.5                    Processeurs : 12 × AMD Ryzen 5 4600H with Radeon Graphics   
KDE Frameworks : 5.78.0          Mémoire : 16 Gio de mémoire vive       
Qt : 5.15.2

Hors ligne

#2 13-03-2023 16:30:36

vv222
Administrateur
Lieu : Bretagne
Distrib. : Debian Sid
(G)UI : sway
Inscription : 18-11-2013
Site Web

Re : [RESOLU] apache2 : The requested URL was not found on this server

Dans la configuration Apache tu as défini un nom de domaine :

ServerName dolibarr01.localhost


Ensuite tu as essayé de lancer l’installation via un autre domaine :

http://localhost/dolibarr01/htdocs/install/index.php




Je ne sais pas exactement ce que tu cherches à obtenir ici, mais ce n’est sûrement pas la bonne approche.


Jouer sous Debian ? Facile !

Ceterum censeo Barum esse delendam

Hors ligne

#3 13-03-2023 16:32:20

doli8888
Membre
Lieu : 07110 VINEZAC
Distrib. : Debian Bullseye
Noyau : Linux 6.1.0-0.deb11.11-amd64
(G)UI : kwin
Inscription : 09-07-2019
Site Web

Re : [RESOLU] apache2 : The requested URL was not found on this server

j'ai fait pareil sur l'autre dolibarr dolibarr et cela fonctionne !!
il aurait mieux valu faire comment ... ?

Debian GNU/Linux 11  64-bit     Noyau : 6.1.0-0.deb11.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4~bpo11+1 (2023-08-08) x86_64 GNU/Linux                                                 
KDE Plasma 5.20.5                    Processeurs : 12 × AMD Ryzen 5 4600H with Radeon Graphics   
KDE Frameworks : 5.78.0          Mémoire : 16 Gio de mémoire vive       
Qt : 5.15.2

Hors ligne

#4 13-03-2023 17:02:07

anonyme
Invité

Re : [RESOLU] apache2 : The requested URL was not found on this server

Si je ne m'abuse l'URL à saisir est

http://localhost/dolibarr01/install/index.php



edit: et comme l'a signalé vv222 le nom de domaine devrait être "dolibarr01" sans ".localhost"

Dernière modification par anonyme (13-03-2023 17:27:18)

#5 13-03-2023 19:37:45

doli8888
Membre
Lieu : 07110 VINEZAC
Distrib. : Debian Bullseye
Noyau : Linux 6.1.0-0.deb11.11-amd64
(G)UI : kwin
Inscription : 09-07-2019
Site Web

Re : [RESOLU] apache2 : The requested URL was not found on this server

tux12 , non l'adresse pour l'installation est bien

http://localhost/dolibarr01/htdocs/install/index.php

le répertoire install est dans htdocs.

J'ai corrigé le domaine, cela ne change rien , c'est toujours bloqué sur : The requested URL was not found on this server.

Pourtant, l'autre installation de dolibarr fonctionne très bien, j'ai copié les mêmes paramètres et j'ai changé uniquement l'adresse du répertoire. J'ai l'impression que cela bloque du au fait que l'installation se passe dans /var/www alors que l'autre installation est dans /var/www/html

dans /var/www/html apache2 fonctionne et pas dans /var/www



?

Edit :

Je viens de déplacer dolibarr01 dans /var/www/html en modifiant le virtual host comme ceci

<VirtualHost *:80>

#ServerName yourdomain.com
ServerName dolibarr01

#DocumentRoot /var/www/dolibarr01/htdocs/
DocumentRoot /var/www/html/dolibarr01/htdocs/

#<Directory /var/www/dolibarr01/htdocs>
<Directory /var/www/html/dolibarr01/htdocs>
#prends en compte htAcces
#AllowOverride All

Options +FollowSymLinks
Require all granted
</Directory>

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

</VirtualHost>


et là dolibarr01 la connexion à

http://localhost/dolibarr01/htdocs/install/index.php

fonctionne !!! mais pas dans /var/www

??

Dernière modification par doli8888 (13-03-2023 19:52:23)


Debian GNU/Linux 11  64-bit     Noyau : 6.1.0-0.deb11.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4~bpo11+1 (2023-08-08) x86_64 GNU/Linux                                                 
KDE Plasma 5.20.5                    Processeurs : 12 × AMD Ryzen 5 4600H with Radeon Graphics   
KDE Frameworks : 5.78.0          Mémoire : 16 Gio de mémoire vive       
Qt : 5.15.2

Hors ligne

#6 13-03-2023 19:56:23

anonyme
Invité

Re : [RESOLU] apache2 : The requested URL was not found on this server

Désolé je me suis un peu raté neutral, l'URL pour la configuration que j'ai décrite est

http://dolibarr01/install/index.php

#7 13-03-2023 20:05:46

doli8888
Membre
Lieu : 07110 VINEZAC
Distrib. : Debian Bullseye
Noyau : Linux 6.1.0-0.deb11.11-amd64
(G)UI : kwin
Inscription : 09-07-2019
Site Web

Re : [RESOLU] apache2 : The requested URL was not found on this server

j'ai remis le virtual host :

<VirtualHost *:80>

#ServerName yourdomain.com
ServerName dolibarr01

DocumentRoot /var/www/dolibarr01/htdocs/
#DocumentRoot /var/www/html/dolibarr01/htdocs/

<Directory /var/www/dolibarr01/htdocs>
#<Directory /var/www/html/dolibarr01/htdocs>
#prends en compte htAcces
#AllowOverride All

Options +FollowSymLinks
Require all granted
</Directory>

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

</VirtualHost>


et déplacé dolibarr01 dans /var/www et effectivement avec cette adresse cela est OK

Peut tu me dire pourquoi STP, on est en dehors du localhost ? cela ne passe pas par apache2 ? je suis perdu là
merci


Debian GNU/Linux 11  64-bit     Noyau : 6.1.0-0.deb11.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4~bpo11+1 (2023-08-08) x86_64 GNU/Linux                                                 
KDE Plasma 5.20.5                    Processeurs : 12 × AMD Ryzen 5 4600H with Radeon Graphics   
KDE Frameworks : 5.78.0          Mémoire : 16 Gio de mémoire vive       
Qt : 5.15.2

Hors ligne

#8 13-03-2023 20:10:59

anonyme
Invité

Re : [RESOLU] apache2 : The requested URL was not found on this server

La mention du localhost n'est utile que dans le /etc/hosts (ou sur un serveur DNS) afin de permettre de faire le lien entre le domaine "dolibarr01" et l'ip du serveur , ici localhost, et ainsi d'envoyer la requête HTTP vers la bonne IP.

#9 13-03-2023 20:14:27

doli8888
Membre
Lieu : 07110 VINEZAC
Distrib. : Debian Bullseye
Noyau : Linux 6.1.0-0.deb11.11-amd64
(G)UI : kwin
Inscription : 09-07-2019
Site Web

Re : [RESOLU] apache2 : The requested URL was not found on this server

Merci tux2smile

OK

mais dans ce cas pourquoi le site installé dans /var/www/html  lui fonctionne sur ces deux adresses :
http://localhost/dolibarr/htdocs/index.php
ET
http://dolibarr/htdocs/index.php

donc mon host est mal configuré ?

/etc/hosts

# Host addresses
127.0.0.1  localhost
127.0.0.1  dolibarr
127.0.0.1  dolibarr01
127.0.1.1  KuJL
::1        localhost ip6-localhost ip6-loopback
ff02::1    ip6-allnodes
ff02::2    ip6-allrouters

Dernière modification par doli8888 (13-03-2023 20:41:24)


Debian GNU/Linux 11  64-bit     Noyau : 6.1.0-0.deb11.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4~bpo11+1 (2023-08-08) x86_64 GNU/Linux                                                 
KDE Plasma 5.20.5                    Processeurs : 12 × AMD Ryzen 5 4600H with Radeon Graphics   
KDE Frameworks : 5.78.0          Mémoire : 16 Gio de mémoire vive       
Qt : 5.15.2

Hors ligne

#10 13-03-2023 21:00:50

anonyme
Invité

Re : [RESOLU] apache2 : The requested URL was not found on this server

Avec la racine du serveur en /var/www,

l'URL http://localhost/dolibarr/htdocs/index.php se décompose en
localhost -> 127.0.0.1 qui correspond à  /var/www
suivi du chemin depuis /var/www soit au final /var/www/dolibarr/htdocs/index.php

pour l'autre requête http://dolibarr/htdocs/index.php
dolibarr -> 127.0.0.1 soit /var/www/
suivi du chemin depuis /var/www soit au final /var/www/htdocs/index.php

on peut constater que ça ne tape pas au même endroit.

edit: tu aurais je pense intérêt à donner à ton host (conf apache du site et /etc/hosts) un nom de la forme dolibarr.home ou dolibarr.<nom_de_machine> afin de mieux différencier ce qui est nom d'hôte de ce qui est chemin dans la requête (ce que permet habituellement un .com ou .fr).

Dernière modification par anonyme (13-03-2023 21:10:15)

#11 13-03-2023 21:12:42

doli8888
Membre
Lieu : 07110 VINEZAC
Distrib. : Debian Bullseye
Noyau : Linux 6.1.0-0.deb11.11-amd64
(G)UI : kwin
Inscription : 09-07-2019
Site Web

Re : [RESOLU] apache2 : The requested URL was not found on this server

on peut constater que ça ne tape pas au même endroit.

euuuh c'est pourtant la même application. Y a un dolibarr qui a disparu ?!scratchhead.gifoula un raccourci a été créé quelque-part ?


EDIT :
ok , je viens de faire pour /etc/hosts

# Host addresses
127.0.0.1  localhost
127.0.0.1  dolibarr
127.0.0.1  dolibarr01.home
127.0.1.1  KuJL
::1        localhost ip6-localhost ip6-loopback
ff02::1    ip6-allnodes
ff02::2    ip6-allrouters
 

et pour dolibarr01.conf

#ServerName yourdomain.com
ServerName dolibarr01.home

DocumentRoot /var/www/dolibarr01/htdocs/
#DocumentRoot /var/www/html/dolibarr01/htdocs/

<Directory /var/www/dolibarr01/htdocs>
#<Directory /var/www/html/dolibarr01/htdocs>
#prends en compte htAcces
#AllowOverride All

Options +FollowSymLinks
Require all granted
</Directory>

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

</VirtualHost>
 


Du coup c'est accessible sur

Dernière modification par doli8888 (13-03-2023 21:19:34)


Debian GNU/Linux 11  64-bit     Noyau : 6.1.0-0.deb11.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4~bpo11+1 (2023-08-08) x86_64 GNU/Linux                                                 
KDE Plasma 5.20.5                    Processeurs : 12 × AMD Ryzen 5 4600H with Radeon Graphics   
KDE Frameworks : 5.78.0          Mémoire : 16 Gio de mémoire vive       
Qt : 5.15.2

Hors ligne

#12 14-03-2023 00:27:51

anonyme
Invité

Re : [RESOLU] apache2 : The requested URL was not found on this server

De ce qui précède dans ce fil tu as 2 sites installés, l'un en /var/www/ et l'autre en /var/www/html/

Ça ne simplifie pas la compréhension du problème. Comme l'un des répertoires racine de site est inclus dans l'autre ça rend possible l'accès aux pages  du site "inclus"
soit par http://<site_incluant>/chemin_dans_site_incluant/page_site_inclus.php
soit par http://<site_inclus>/page_site_inclus.php

ou
soit par http://<site_incluant>/chemin_dans_site_incluant/[chemin_dans_site_inclus/]page_site_inclus.php
soit par http://<site_inclus>/[chemin_dans_site_inclus/]page_site_inclus.php

et comme les 2 sites ont les mêmes noms de répertoires et de pages ça embrouille encore plus facilement.

Je suggère de séparer les logs des 2 sites ça te permettra de savoir sur quel site ça tape réellement.

Dernière modification par anonyme (14-03-2023 00:33:01)

#13 14-03-2023 11:21:31

doli8888
Membre
Lieu : 07110 VINEZAC
Distrib. : Debian Bullseye
Noyau : Linux 6.1.0-0.deb11.11-amd64
(G)UI : kwin
Inscription : 09-07-2019
Site Web

Re : [RESOLU] apache2 : The requested URL was not found on this server

tux12

oui tu as raison, c'est l'embrouille comme cela !
Je vais faire plus simple et réinstaller les deux sites dans /var/ww , avec deux noms bien distincts.

Merci pour ta patience
Belle journée
Jluc

Dernière modification par doli8888 (14-03-2023 11:21:46)


Debian GNU/Linux 11  64-bit     Noyau : 6.1.0-0.deb11.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4~bpo11+1 (2023-08-08) x86_64 GNU/Linux                                                 
KDE Plasma 5.20.5                    Processeurs : 12 × AMD Ryzen 5 4600H with Radeon Graphics   
KDE Frameworks : 5.78.0          Mémoire : 16 Gio de mémoire vive       
Qt : 5.15.2

Hors ligne

Pied de page des forums