IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Apache Discussion :

Configurer Apache dans EclipsePHP


Sujet :

Apache

  1. #1
    Membre confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2008
    Messages
    757
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Février 2008
    Messages : 757
    Points : 572
    Points
    572
    Par défaut Configurer Apache dans EclipsePHP
    Bonjour,

    Je souhaite utiliser Eclipse pour développer en PHP et APACHE2 comme serveur.
    Je n'ai pas installé tomcat ni xampp ou quoi que ce soit.
    J'ai simplment installé apache2 et cela fonctionne vu la commande suivante :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    root@kimilie-MS-7816://# service apache2 start
     * Starting web server apache2                                                                                                                                              *
    Par contre, dans éclipse, lorsque je veux faire tourner (RUN) ma page php, Eclipse ne trouve pas le serveur (comme vous pouvez le voir ci-dessous dans la copie d'écran d'Eclipse).
    Nom : phpSC1.png
Affichages : 904
Taille : 17,2 Ko

    Donc, dans Eclipse, j'ai été dans "window/préférences/server/RuntimeEnvironment" et je clique sur "ADD".

    Là, Eclipse me propose toute une panoplie de serveurs, et, dans le dossier "Apache", je ne vois que les apaches tomcat (rappel : je n'ai pas installé tomcat mais directement APACHE sur ma machine).
    Dans le dossier "Basic", je vois un "HTTP server" mais je ne suis pas sur que ce soit le Apache que j'ai installé.
    Nom : PHP.png
Affichages : 1032
Taille : 112,0 Ko
    D'après vous, quel serveur dois-je installer s'il vous plaît ?

    J'ai essayé d'ajouter un HTTPserver, en lui donnant le chemin '/var/www/html' mais cela ne fonctionne pas. un serverTomcat7 ne focntionne pas non plus ...

    Merci beaucoup,
    OS : LinuxMint 20

  2. #2
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Vu que le message d'erreur est renvoyé par Apache, je dirais qu'il suffit de modifier la configuration d'Apache pour indiquer dans DocumentRoot le répertoire de ton projet Eclipse.

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

  3. #3
    Membre confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2008
    Messages
    757
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Février 2008
    Messages : 757
    Points : 572
    Points
    572
    Par défaut
    Bonsoir,

    Merci pour ce conseil !

    Je me suis renseigné sur DocumentRoot et j'ai remplacé, dans le fichier "/etc/apache2/sites-available/000-default.conf", "DocumentRoot /var/www/html" par "DocumentRoot /home/kimilie/TestApache".

    Par contre, j'ai eu toute une série d'erreurs que j'ai pu en partie régler.

    En premier, j'avais la ligne 177 du fichier "apache2.conf" qui était en erreur car "httpd.conf" n'existait pas. J'ai donc créé ce fichier comme suit :

    Remarque : Pour tout le code qui suit, je suis en root. pour passer en root, taper la commande suivante, cela vous demandera votre mot de passe système :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    root@kimilie-MS-7816://etc/apache2/sites-available# service apache2 start
     * Starting web server apache2                                                                                                                                              * 
     * The apache2 configtest failed.
    Output of config test was:
    apache2: Syntax error on line 177 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/httpd.conf: No such file or directory
    Action 'configtest' failed.
    The Apache error log may have more information.
     
    root@kimilie-MS-7816://etc/apache2# gedit apache2.conf
    root@kimilie-MS-7816://etc/apache2# touch /etc/apache2/httpd.conf
    root@kimilie-MS-7816://etc/apache2# ls
    apache2.conf  apache2.conf~  conf-available  conf-enabled  envvars  httpd.conf  magic  mods-available  mods-enabled  ports.conf  sites-available  sites-enabled
    Une fois ce fichier créé, j'ai relancé Apache, mais c'est la ligne 184 du fichier "apache2.conf" qui lui devenait alors indigeste.... j'ai réglé le problème en créant un dossier "conf.d" comme suit :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
     
    root@kimilie-MS-7816://etc/apache2# /etc/init.d/apache2 restart
     * Restarting web server apache2                                                                                                                                    [fail] 
     * The apache2 configtest failed.
    Output of config test was:
    apache2: Syntax error on line 184 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/: No such file or directory
    Action 'configtest' failed.
    The Apache error log may have more information.
    root@kimilie-MS-7816://etc/apache2# gedit apache2.conf
     
    root@kimilie-MS-7816://etc/apache2# mkdir conf.d
    Une fois ce dossier créé, j'ai relancé apache ....

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    root@kimilie-MS-7816://etc/apache2# /etc/init.d/apache2 restart
     * Restarting web server apache2                                                                                                                                    [fail] 
     * The apache2 configtest failed.
    Output of config test was:
    AH00526: Syntax error on line 8 of /etc/apache2/apache2.conf:
    Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration
    Action 'configtest' failed.
    The Apache error log may have more information.
    pour, une nouvelle fois (comme vous l'avez remarqué dans le code ci-dessus) obtenir une erreur à la ligne 8 du fichier "apache2.conf". Le message d'erreur stipule une commande "LockFile" invalide. J'ai donc mis en commentaire avec le signe dièze (#) cette fameuse ligne 8 histoire de lui clouer le bec ! et voici ce que j'ai obtenu :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    root@kimilie-MS-7816://etc/apache2# gedit apache2.conf
     
    root@kimilie-MS-7816://etc/apache2# /etc/init.d/apache2 restart
     * Restarting web server apache2                                                                                                                                           AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
                                                                                                                                                                        [fail]
     * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
    root@kimilie-MS-7816://etc/apache2#

    Et là, par contre je ne sais que faire face à ce message d'erreur (d'horreur ???) !
    Je vais me renseigner pour savoir où est situé le fichier log d'apache ....

    Je vous remercie de me conseiller de nouveau !
    OS : LinuxMint 20

  4. #4
    Membre confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2008
    Messages
    757
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Février 2008
    Messages : 757
    Points : 572
    Points
    572
    Par défaut
    Re !

    Bon, comme j'avais touché le fichier apache2.conf au départ (car j'avais trouvé une configuration sur un site d'unbuntu), j'ai remplace le contenu.
    Donc avant j'avais ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    # Répertoire Racine du serveur
    ServerRoot "/etc/apache2"
     
    # Fichier de vérrouillage (lock) du serveur 
    # IL DOIT SE TROUVER SUR LE DISQUE LOCAL
    #<IfModule !mpm_winnt.c>
    #<IfModule !mpm_netware.c>
    LockFile /var/lock/apache2/accept.lock
    #</IfModule>
    #</IfModule>
     
    # Fichier du PID: endroit où, à son démarrage, apache doit stocker
    # son numéro d'identification de processus
    PidFile /var/run/apache2.pid
     
    # Delai d'attente dépassé : nombre de secondes avant de recevoir et d'envoyer
    # un message de "Délai d'attente dépassé" (timeout)
    Timeout 300
     
    # Connexion persistante: Alloue ou non les requêtes persistantes
    # (plus d'une requête par connexion ).
    # Mettre à "Off" pour désactiver.
    KeepAlive On
     
    # Nombre Maximum de requêtes allouées durant une connexion persistante.
    # 0 = non limité
    # Il est recommandé de garder ce nombre assez haut pour des performances maximales
    MaxKeepAliveRequests 100
     
    # Nombre de secondes d'attente pour la prochaine requête
    # d'un même client sur une même connexion avant un timeout
    KeepAliveTimeout 15
     
    # Configuration du mpm chargé
    <IfModule mpm_prefork_module>
    # Nombre de processus serveurs fils à créer au démarrage.
       StartServers          5
    # Nombre minimum de processus en attente d'intercepter des requêtes
       MinSpareServers       5
    # Nombre maximum de processus en attente
       MaxSpareServers      15
    # Nombre maximum processus fils créés
    # pour intercepter les requêtes simultanément
       MaxClients          150
    # Limite le nombre de requête qu'un processus fils intercepte 
    # durant son temps de vie. Si 0 alors le processus n'expirera jamais.
        MaxRequestsPerChild   0
    </IfModule>
     
    <IfModule mpm_worker_module>
        StartServers          2
        MaxClients          150
    # Nombre minimum de processus en attente d'intercepter les piques de requêtes
        MinSpareThreads      25
    # Nombre maximum de processus en attente
        MaxSpareThreads      75 
        ThreadsPerChild      25
        MaxRequestsPerChild   0
    </IfModule>
     
    # Utilisateur et Group sous lesquels les processus du serveur seront lancés
    User www-data
    Group www-data
     
    # Fichier de restriction des accès 
    # non conseillé, préferer les directives internes au fichier de configuration
    # voir [[http://httpd.apache.org/docs/2.2/howto/htaccess.html]]
    AccessFileName .htaccess
     
    # Les lignes suivantes empêchent les fichiers .htaccess et .htpasswd d'être vus 
    # par les clients Web (i.e. les navigateurs) .
    <Files ~ "^\.ht">
        Order allow,deny
        Deny from all
        Satisfy All
    </Files>
     
    # Restriction de la racine du serveur
    <Directory />
      Order Deny,Allow
      Deny from all
      Options None
      AllowOverride None
    </Directory>
     
    # Fichier contenant la liste des conversions des extensions de fichiers vers le type de contenu.
    # par défaut ce fichier est relié au contenu enregistré à l'IANA. http://www.iana.org/assignments/media-types/index.html.
    TypesConfig /etc/mime.types
     
    # définit le type par défaut des fichiers dont le type ne peut être déterminé
    # par le serveur.
    # Il convient de le mettre à "none" afin de ne pas fournir d'informations erronées.
    DefaultType none
     
    # Active la résolution DNS pour les noms d'hôtes
    HostnameLookups Off
     
    # chemin du fichier de log des erreurs du serveur.
    ErrorLog /var/log/apache2/error.log
     
    # niveau de log du serveur 
    # emerg  	Messages Urgents - Le système est inutilisable.
    # alert 	Messages d'actions qui doivent être effectuées immédiatement.
    # crit 	        Messages critiques.
    # error 	Messages d'erreurs.
    # warn 	        Messages d'avertissement.
    # notice 	Messages normales mais significatives.
    # info 	        Messages d'informations.
    # debug 	Messages de débogage
    LogLevel warn
     
    # format des lignes contenues dans les logs
    # %a 	        Adresse ip distante.
    # %A 	        Adresse ip local.
    # %B 	        Taille de la réponse en octets, excluant l'entête HTTP.
    # %b 	        Taille de la réponse en octets, excluant l'entête HTTP au format CLF.
    # %{Foobar}C 	Contenu du cookie "Foobar" de la requête envoyée au serveur.
    # %D 	        Le temps mis à servir la requête .
    # %{FOOBAR}e 	Contenue de la variable d'environnement "FOOBAR".
    # %f 	        Nom du fichier.
    # %h 	        Hôte distant.
    # %H 	        Le protocole demandé.
    # %{Foobar}i 	Le contenu de "Foobar": Ligne(s) d'en-tête de la requête envoyée au serveur.
    # %l 	        nom du fichier de log distant (de identd, si il est fournit).
    # cela retournera un tiret tant que //mod_ident// n'est pas présent 
    # et //IdentityCheck// n'est pas mis à ON.
    # %m 	        Méthode de la requête.
    # %{Foobar}n 	Contenu de la note "Foobar" provenant d'un autre module.
    # %{Foobar}o 	Le contenu de "Foobar": Ligne(s) d'entête dans la réponse.
    # %p 	        Port canonique du serveur qui sert la réponse.
    # %P 	        Id du processus fils qui a servi la requête.
    # %{format}P 	Id du processus ou du thread fils qui a servi la requête.
    # Les formats valides sont pid, tid, et hextid.
    # hextid nécessite APR 1.2.0 ou supérieur.
    # %q 	        Chaînes de la requête (Commençant avec un ? si une chaine de requête existe, sinon une chaîne vide)
    # %r 	        Première ligne de la requête.
    # %s 	        Statut. Pour les requête redirigées en interne, ceci est la requête originale --- %>s pour la dernière.
    # %t 	        Heure à laquelle la requête a été reçue (format standard anglais mois jour année )
    # %{format}t 	L'heure, au format précisé, qui doit être dans les formats de strftime(3). (potentiellement localisé).
    # %T 	        Le temps mis pour répondre à la requête.
    # %u 	        Utilisateur distant (de l'authentification; peut être faux si le  code de retour de statut (%s) est 401)
    # %U 	        Url demandée, n'inclue aucune chaîne de requête.
    # %v 	        Nom canonique de ServerName du serveur qui répond à la requête.
    # %V 	        Nom du serveur en fonction du paramètre UseCanonicalName.
    # %X 	        Statut de la connexion une fois la réponse envoyée.
    #               X = connexion annulée avant la réponse complète.
    #               + = la connexion peut être maintenue après l'envoi de la réponse.
    #               - = la connexion sera fermée après l'envoi de la réponse.
    # %I 	        Octets reçus, incluant l'entête et la requête, ne peut être nul. Vous devez activer //mod_logio// pour l'utiliser.
    # %O 	        Octets envoyés, incluant l'entête, ne peut être nul. Vous devez activer //mod_logio// pour l'utiliser.
     
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent
     
    # entête envoyée au client à propos du serveur
    # Prod                    Server: Apache
    # Major                   Server: Apache/2
    # Minor                   Server: Apache/2.0
    # Min                     Server: Apache/2.0.41
    # OS                      Server: Apache/2.0.41 (Unix)
    # Full (ou non spécifié)  Server: Apache/2.0.41 (Unix) PHP/4.2.2 MyMod/1.2 
    ServerTokens Prod
     
    # Pied de page renvoyé par le serveur 
    # utile afin de déterminer quelle est le serveur 
    # qui dans une chaîne (proxy) qui génère une erreur
    ServerSignature Off
     
    # Inclusion des fichiers, contenus dans le dossier des mods, qui sont activés
    Include /etc/apache2/mods-enabled/*.load
    Include /etc/apache2/mods-enabled/*.conf
     
    # Inclusion de l'ancien fichier de configuration de apache
    # à des fins de compatibilités ascendantes.
    Include /etc/apache2/httpd.conf
     
    # Inclusion du fichier de configuration des adresses et ports
    # sur lesquels le serveur sera à l'écoute
    Include /etc/apache2/ports.conf
     
    # Inclusion d'autres fichiers de configuration
    Include /etc/apache2/conf.d/
     
    # inclusion des configurations des sites actifs
    Include /etc/apache2/sites-enabled/
     
    # Directive des alias
    <IfModule alias_module>
    # alias des icones d'apache
    # nom de l'alias , répertoire vers lequel pointe l'alias
        Alias /icons "/usr/share/apache2/icons/"
        <Directory "/usr/share/apache2/icons">
            Options None
            AllowOverride None
            Order allow,deny
            Allow from all
        </Directory>
     
    # alias pour awstats 
        Alias /awstats-icon "/usr/share/awstats/icon"
        ScriptAlias /awstats "/usr/lib/cgi-bin/"
    	<Directory "/usr/share/awstats/icon">
       	     Options None
    #Indexes MultiViews
    		AllowOverride None
    		Order allow,deny
    		Allow from all
    	</Directory>
    </IfModule>
     
    # Types images d'icône
    <IfModule mod_autoindex.c>
     
        IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=*
     
        AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
     
        AddIconByType (TXT,/icons/text.gif) text/*
        AddIconByType (IMG,/icons/image2.gif) image/*
        AddIconByType (SND,/icons/sound2.gif) audio/*
        AddIconByType (VID,/icons/movie.gif) video/*
     
        AddIcon /icons/binary.gif .bin .exe
        AddIcon /icons/binhex.gif .hqx
        AddIcon /icons/tar.gif .tar
        AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
        AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
        AddIcon /icons/a.gif .ps .ai .eps
        AddIcon /icons/layout.gif .html .shtml .htm .pdf
        AddIcon /icons/text.gif .txt
        AddIcon /icons/c.gif .c
        AddIcon /icons/p.gif .pl .py
        AddIcon /icons/f.gif .for
        AddIcon /icons/dvi.gif .dvi
        AddIcon /icons/uuencoded.gif .uu
        AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
        AddIcon /icons/tex.gif .tex
        AddIcon /icons/bomb.gif core
     
        AddIcon /icons/back.gif ..
        AddIcon /icons/hand.right.gif README
        AddIcon /icons/folder.gif ^^DIRECTORY^^
        AddIcon /icons/blank.gif ^^BLANKICON^^
     
     
        DefaultIcon /icons/unknown.gif
     
        ReadmeName README.html
        HeaderName HEADER.html
     
        IndexIgnore .??* *~ *# RCS CVS *,v *,t 
    </IfModule>
     
    # Type langages
    <IfModule mod_mime.c>
        AddType application/x-compress .Z
        AddType application/x-gzip .gz .tgz
     
        AddLanguage ca .ca
        AddLanguage cs .cz .cs
        AddLanguage da .dk
        AddLanguage de .de
        AddLanguage el .el
        AddLanguage en .en
        AddLanguage eo .eo
        AddLanguage es .es
        AddLanguage et .et
        AddLanguage fr .fr
        AddLanguage he .he
        AddLanguage hr .hr
        AddLanguage it .it
        AddLanguage ja .ja
        AddLanguage ko .ko
        AddLanguage ltz .ltz
        AddLanguage nl .nl
        AddLanguage nn .nn
        AddLanguage no .no
        AddLanguage pl .po
        AddLanguage pt .pt
        AddLanguage pt-BR .pt-br
        AddLanguage ru .ru
        AddLanguage sv .sv
        AddLanguage zh-CN .zh-cn
        AddLanguage zh-TW .zh-tw
    </IfModule>
     
    # Langue prioritaire pour les pages de réponses (choisir l'ordre des langues des pages)
    <IfModule mod_negotiation.c>
     
        LanguagePriority fr ca cs da de el eo es et en he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
     
        ForceLanguagePriority Prefer Fallback
     
    </IfModule>
     
    # Type d'encodage de caractères 
    <IfModule mod_mime.c>
        AddCharset us-ascii    .ascii .us-ascii
        AddCharset ISO-8859-1  .iso8859-1  .latin1
        AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
        AddCharset ISO-8859-3  .iso8859-3  .latin3
        AddCharset ISO-8859-4  .iso8859-4  .latin4
        AddCharset ISO-8859-5  .iso8859-5  .cyr .iso-ru
        AddCharset ISO-8859-6  .iso8859-6  .arb .arabic
        AddCharset ISO-8859-7  .iso8859-7  .grk .greek
        AddCharset ISO-8859-8  .iso8859-8  .heb .hebrew
        AddCharset ISO-8859-9  .iso8859-9  .latin5 .trk
        AddCharset ISO-8859-10  .iso8859-10  .latin6
        AddCharset ISO-8859-13  .iso8859-13
        AddCharset ISO-8859-14  .iso8859-14  .latin8
        AddCharset ISO-8859-15  .iso8859-15  .latin9
        AddCharset ISO-8859-16  .iso8859-16  .latin10
        AddCharset ISO-2022-JP .iso2022-jp .jis
        AddCharset ISO-2022-KR .iso2022-kr .kis
        AddCharset ISO-2022-CN .iso2022-cn .cis
        AddCharset Big5        .Big5       .big5 .b5
        AddCharset cn-Big5     .cn-big5
        # For russian, more than one charset is used (depends on client, mostly):
        AddCharset WINDOWS-1251 .cp-1251   .win-1251
        AddCharset CP866       .cp866
        AddCharset KOI8      .koi8
        AddCharset KOI8-E      .koi8-e
        AddCharset KOI8-r      .koi8-r .koi8-ru
        AddCharset KOI8-U      .koi8-u
        AddCharset KOI8-ru     .koi8-uk .ua
        AddCharset ISO-10646-UCS-2 .ucs2
        AddCharset ISO-10646-UCS-4 .ucs4
        AddCharset UTF-7       .utf7
        AddCharset UTF-8       .utf8
        AddCharset UTF-16      .utf16
        AddCharset UTF-16BE    .utf16be
        AddCharset UTF-16LE    .utf16le
        AddCharset UTF-32      .utf32
        AddCharset UTF-32BE    .utf32be
        AddCharset UTF-32LE    .utf32le
        AddCharset euc-cn      .euc-cn
        AddCharset euc-gb      .euc-gb
        AddCharset euc-jp      .euc-jp
        AddCharset euc-kr      .euc-kr
        #Not sure how euc-tw got in - IANA doesn't list it???
        AddCharset EUC-TW      .euc-tw
        AddCharset gb2312      .gb2312 .gb
        AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2
        AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4
        AddCharset shift_jis   .shift_jis .sjis
     
        AddHandler type-map var
     
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
    </IfModule>
     
    <IfModule mod_setenvif.c>   
        BrowserMatch "Mozilla/2" nokeepalive
        BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
        BrowserMatch "RealPlayer 4\.0" force-response-1.0
        BrowserMatch "Java/1\.0" force-response-1.0
        BrowserMatch "JDK/1\.0" force-response-1.0
     
        BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
        BrowserMatch "MS FrontPage" redirect-carefully
        BrowserMatch "^WebDrive" redirect-carefully
        BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
        BrowserMatch "^gnome-vfs/1.0" redirect-carefully
        BrowserMatch "^XML Spy" redirect-carefully
        BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
    </IfModule>
     
    # module d'information sur le statut du serveur
    <IfModule mod_status.c>
        <Location /server-status>
            SetHandler server-status
            Order deny,allow
            Deny from all
            Allow from 127.0.0.1
        </Location>
    </IfModule>
     
    # module des informations du serveur
    <IfModule mod_info.c>
        <Location /server-info>
            SetHandler server-info
            Order deny,allow
            Deny from all
            Allow from 127.0.0.1
        </Location>
    </IfModule>
    Et j'ai remplacé par le fichier "apache2.conf" d'origine puisque je l'avais gardé au chaud.
    J'ai ensuite redémarré apache mais j'obtiens encore une erreur :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    root@kimilie-MS-7816://etc/apache2# service apache2 start
     * Starting web server apache2                                                                                                                                             AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
    (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
    (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    AH00015: Unable to open logs
    Action 'start' failed.
    The Apache error log may have more information.
     * 
     * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
    Si quelqu'un qui comprend mon problème peut m'aider ... merci
    OS : LinuxMint 20

  5. #5
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Visiblement, Apache tourne déjà sur ta machine et tu n'as pas modifié le fichier de conf du bon Apache.

    Peux-tu nous donner le résultat de la commande suivante, s'il te plaît ?

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

  6. #6
    Membre confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2008
    Messages
    757
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Février 2008
    Messages : 757
    Points : 572
    Points
    572
    Par défaut
    Bonjour,

    Voici le résultat de cette commande :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    root@kimilie-MS-7816://# ps -ef | grep http
    root      7005  5214  0 21:30 pts/5    00:00:00 grep --color=auto http
    Personnellement, je ne comprends pas ces résultats !
    Que signifient-ils s'il vous plaît ?

    Il faut dire que depuis hier, j'ai fait beaucoup de choses que je n'ai pas relatées ici .... entre autres de nombreuses désinstallation et réinstallations ....
    Aujourd'hui, le résultat de la commande pour starter apache2 donne ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    root@kimilie-MS-7816://# service apache2 start
     * Starting web server apache2                                                                                                                                             
    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
     *
    et mon fichier /etc/apache2/apache2.conf est celui-ci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    # 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
     
    #
    # 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 /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
    Merci beaucoup !
    OS : LinuxMint 20

  7. #7
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Le but de la commande s'était de voir si on autre Apache tourne sur la machine.

    Concernant ta dernière trace, je ne comprends pas : Apache démarre ou pas ? S'il ne démarre pas, que dit-il dans les logs ?

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

  8. #8
    Membre confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2008
    Messages
    757
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Février 2008
    Messages : 757
    Points : 572
    Points
    572
    Par défaut
    Bonjour,

    apache tourne, mais je n'arrive toujours pas à le lier avec Eclipse !

    Voici mon error.log :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    [Sat Feb 07 22:33:55.507622 2015] [mpm_event:notice] [pid 9025:tid 3074382464] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
    [Sat Feb 07 22:33:55.507692 2015] [core:notice] [pid 9025:tid 3074382464] AH00094: Command line: '/usr/sbin/apache2'
    [Sat Feb 07 22:57:43.788218 2015] [mpm_event:notice] [pid 9025:tid 3074382464] AH00491: caught SIGTERM, shutting down
    [Sat Feb 07 23:14:14.631921 2015] [mpm_event:notice] [pid 9880:tid 3074665088] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
    [Sat Feb 07 23:14:14.631992 2015] [core:notice] [pid 9880:tid 3074665088] AH00094: Command line: '/usr/sbin/apache2'
    [Sat Feb 07 23:55:54.999494 2015] [mpm_event:notice] [pid 9880:tid 3074665088] AH00491: caught SIGTERM, shutting down
    [Sun Feb 08 09:39:26.086477 2015] [mpm_event:notice] [pid 2626:tid 3074087552] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
    [Sun Feb 08 09:39:26.105404 2015] [core:notice] [pid 2626:tid 3074087552] AH00094: Command line: '/usr/sbin/apache2'
    [Sun Feb 08 10:00:55.000234 2015] [mpm_event:notice] [pid 2626:tid 3074087552] AH00491: caught SIGTERM, shutting down
    [Sun Feb 08 10:57:41.394569 2015] [mpm_event:notice] [pid 2400:tid 3074804352] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
    [Sun Feb 08 10:57:41.406262 2015] [core:notice] [pid 2400:tid 3074804352] AH00094: Command line: '/usr/sbin/apache2'
    [Sun Feb 08 18:44:21.440196 2015] [mpm_event:notice] [pid 2400:tid 3074804352] AH00491: caught SIGTERM, shutting down
    [Sun Feb 08 20:46:29.568885 2015] [mpm_event:notice] [pid 3244:tid 3074718336] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
    [Sun Feb 08 20:46:29.583320 2015] [core:notice] [pid 3244:tid 3074718336] AH00094: Command line: '/usr/sbin/apache2'
    [Sun Feb 08 21:29:44.092941 2015] [mpm_event:notice] [pid 3244:tid 3074718336] AH00491: caught SIGTERM, shutting down
    [Sun Feb 08 21:29:49.540968 2015] [mpm_event:notice] [pid 6944:tid 3074140800] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
    [Sun Feb 08 21:29:49.541095 2015] [core:notice] [pid 6944:tid 3074140800] AH00094: Command line: '/usr/sbin/apache2'
    [Sun Feb 08 21:39:46.942425 2015] [mpm_event:notice] [pid 6944:tid 3074140800] AH00491: caught SIGTERM, shutting down
    [Sun Feb 08 21:39:51.252664 2015] [mpm_event:notice] [pid 7167:tid 3074218624] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
    [Sun Feb 08 21:39:51.252726 2015] [core:notice] [pid 7167:tid 3074218624] AH00094: Command line: '/usr/sbin/apache2'
    [Sun Feb 08 21:46:27.582333 2015] [authz_core:error] [pid 7170:tid 3029318464] [client 127.0.0.1:36770] AH01630: client denied by server configuration: /home/kimilie/Informatique/APACHE/LANCEUR/projet1
    [Sun Feb 08 21:58:42.123903 2015] [authz_core:error] [pid 7170:tid 3012533056] [client 127.0.0.1:37115] AH01630: client denied by server configuration: /home/kimilie/Informatique/APACHE/LANCEUR/projet1
    --> j'ai été voir le dossier /home/kimilie/Informatique/APACHE/LANCEUR/ : il n'y a pas le projet1 dedans ! ce projet aurait du être "poussé" par Eclipse non ?!?

    En fait lorsque je fait un run dans Eclipse, j'obtient ceci :
    Nom : resultEclipsePHP.png
Affichages : 844
Taille : 16,4 Ko

    Et voici mes paramètres dans la fenêtre "server runtime environment" de Eclipse :
    Nom : paramsEcli.png
Affichages : 895
Taille : 107,5 Ko

    et voici mon fichier /etc/apache2.conf :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    # 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
     
    #
    # 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 /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
    Et voici mon fichier /etc/apache2/sites-available/000-default.conf où l'on peut voir la variable "DocumentRoot" :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    <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
    	DocumentRoot /home/kimilie/Informatique/APACHE/LANCEUR
     
    	# 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
    et voici même le code php que j'essaie de fair tourner en vain :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    <!DOCTYPE html>
     
    <html>
        <head>
            <title>test avec balises PHP</title>
            <meta charset="utf-8" />
        </head>
     
        <body>
            <h2>Page de test</h2>
            <p>code HTML avec des balises PHP.<br />
                <?php echo "texte php"; ?>
                petits tests :
            </p>
            <ul>
            <li style="color: blue;">Texte en bleu</li>
            <li style="color: red;">Texte en rouge</li>
            </ul>
            <?php
    			echo "texte php";
            ?>
        </body>
    </html>
    Merci pour votre aide !
    OS : LinuxMint 20

  9. #9
    Expert éminent sénior
    Avatar de mathieu
    Profil pro
    Inscrit en
    Juin 2003
    Messages
    10 235
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 10 235
    Points : 15 532
    Points
    15 532
    Par défaut
    Citation Envoyé par francky74 Voir le message
    --> j'ai été voir le dossier /home/kimilie/Informatique/APACHE/LANCEUR/ : il n'y a pas le projet1 dedans ! ce projet aurait du être "poussé" par Eclipse non ?!?
    c'est peut-être là le problème, tu devrais indiquer dans "DocumentRoot" le répertoire où se trouvent tes fichiers PHP

  10. #10
    Membre confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2008
    Messages
    757
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Février 2008
    Messages : 757
    Points : 572
    Points
    572
    Par défaut
    Bonjour et merci pour votre réponse,

    c'est peut-être là le problème, tu devrais indiquer dans "DocumentRoot" le répertoire où se trouvent tes fichiers PHP
    C'est ce que j'ai fait, comme indiqué dans mon dernier message. A part que c'est le chemin vers le fichier où doivent être poussés les php par Eclipse, mais Eclipse ne les pousse pas :

    Et voici mon fichier /etc/apache2/sites-available/000-default.conf où l'on peut voir la variable "DocumentRoot"
    ServerAdmin webmaster@localhost
    #DocumentRoot /var/www/html
    DocumentRoot /home/kimilie/Informatique/APACHE/LANCEUR
    OS : LinuxMint 20

  11. #11
    Expert éminent sénior
    Avatar de mathieu
    Profil pro
    Inscrit en
    Juin 2003
    Messages
    10 235
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 10 235
    Points : 15 532
    Points
    15 532
    Par défaut
    si le problème est du côté d'Eclipse, demande de l'aide dans le forum suivant :
    http://www.developpez.net/forums/f69...ement/eclipse/

  12. #12
    Membre confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2008
    Messages
    757
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Février 2008
    Messages : 757
    Points : 572
    Points
    572
    Par défaut
    Merci Mathieu !

    OS : LinuxMint 20

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 4
    Dernier message: 08/07/2010, 16h17
  2. Réponses: 8
    Dernier message: 04/04/2009, 12h14
  3. Configuration Apache distant
    Par nah_wah dans le forum Installation
    Réponses: 3
    Dernier message: 09/01/2006, 23h10
  4. Configuration Apache
    Par LordBob dans le forum Apache
    Réponses: 6
    Dernier message: 25/11/2005, 19h26
  5. Pb de configuration, apache
    Par Bernard 2005 dans le forum Apache
    Réponses: 4
    Dernier message: 09/05/2005, 22h52

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo