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

  1. #1
    Membre du Club
    Homme Profil pro
    Inscrit en
    septembre 2012
    Messages
    170
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : septembre 2012
    Messages : 170
    Points : 43
    Points
    43

    Par défaut URL rewrite et htaccess

    Bonjour, je transfère mon ancien site (serveur php 5.3) vers un nouveau serveur (php 5.6). J'ai repris le htaccess déjà fait auparavant qui fonctionnait très bien mais là ça fonctionne plus et je tourne en rond... Donc je suis chez OVH Centos7 Plesk 12.5 avec php5.6.35 en apache. J'ai désactivé le service Reverse Proxy Server (Nginx) pour garder le système de redirection apache comme avant et qui complique la futur install d'un woocommerce en sous domaine. Je me casse le nez sur Nginx donc pour le moment j'aimerai éviter de l utiliser si c'est possible. Dans les paramètres PHP l'option "Rewrite" est bien coché dans l'interface et je l ai ajouté en plus dans le http.conf avec
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    LoadModule rewrite_module modules/mod_rewrite.so
    et changé aussi les Directory. Si j'enlève le fichier htaccess du serveur, la page d'accueil du site s affiche bien mais pas les autres pages générées. En remettant le htaccess même la page d'accueil ne s affiche pas. Une idée de ce qui cloche ? merci !

    le fichier http.conf situé dans etc/httpd/conf donc j ai modifié:
    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
    #
    # This is the main Apache HTTP server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
    # In particular, see 
    # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
    # for a discussion of each configuration directive.
    #
    # Do NOT simply read the instructions in here without understanding
    # what they do.  They're here only as hints or reminders.  If you are unsure
    # consult the online docs. You have been warned.  
    #
    # Configuration and logfile names: If the filenames you specify for many
    # of the server's control files begin with "/" (or "drive:/" for Win32), the
    # server will use that explicit path.  If the filenames do *not* begin
    # with "/", the value of ServerRoot is prepended -- so 'log/access_log'
    # with ServerRoot set to '/www' will be interpreted by the
    # server as '/www/log/access_log', where as '/log/access_log' will be
    # interpreted as '/log/access_log'.
     
    #
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    #
    # Do not add a slash at the end of the directory path.  If you point
    # ServerRoot at a non-local disk, be sure to specify a local disk on the
    # Mutex directive, if file-based mutexes are used.  If you wish to share the
    # same ServerRoot for multiple httpd daemons, you will need to change at
    # least PidFile.
    #
    ServerRoot "/etc/httpd"
     
    #
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    #
    # Change this to Listen on specific IP addresses as shown below to 
    # prevent Apache from glomming onto all bound IP addresses.
    #
    #Listen 12.34.56.78:80
    Listen 7080
     
    #
    # Dynamic Shared Object (DSO) Support
    #
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available _before_ they are used.
    # Statically compiled modules (those listed by `httpd -l') do not need
    # to be loaded here.
    #
    # Example:
    # LoadModule foo_module modules/mod_foo.so
    #
    LoadModule rewrite_module modules/mod_rewrite.so
    Include conf.modules.d/*.conf
     
    #
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.  
    #
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    #
    User apache
    Group apache
     
    # 'Main' server configuration
    #
    # The directives in this section set up the values used by the 'main'
    # server, which responds to any requests that aren't handled by a
    # <VirtualHost> definition.  These values also provide defaults for
    # any <VirtualHost> containers you may define later in the file.
    #
    # All of these directives may appear inside <VirtualHost> containers,
    # in which case these default settings will be overridden for the
    # virtual host being defined.
    #
     
    #
    # ServerAdmin: Your address, where problems with the server should be
    # e-mailed.  This address appears on some server-generated pages, such
    # as error documents.  e.g. admin@your-domain.com
    #
    ServerAdmin root@localhost
     
    #
    # ServerName gives the name and port that the server uses to identify itself.
    # This can often be determined automatically, but we recommend you specify
    # it explicitly to prevent problems during startup.
    #
    # If your host doesn't have a registered DNS name, enter its IP address here.
    #
    #ServerName www.example.com:80
     
    #
    # Deny access to the entirety of your server's filesystem. You must
    # explicitly permit access to web content directories in other 
    # <Directory> blocks below.
    #
    <Directory />
        Options Includes ExecCGI MultiViews FollowSymLinks Indexes
        AllowOverride All
    </Directory>
     
    #
    # Note that from this point forward you must specifically allow
    # particular features to be enabled - so if something's not working as
    # you might expect, make sure that you have specifically enabled it
    # below.
    #
     
    #
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "/var/www/html"
     
    #
    # Relax access to content within /var/www.
    #
    <Directory "/var/www">
        AllowOverride None
        # Allow open access:
        Require all granted
    </Directory>
     
    # Further relax access to the default document root:
    <Directory "/var/www/html">
        Options Includes ExecCGI MultiViews FollowSymLinks Indexes
        AllowOverride All
    </Directory>
     
    #
    # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    #
    <IfModule dir_module>
        DirectoryIndex index.html index.shtml index.cfm index.php index.htm
    </IfModule>
     
    #
    # The following lines prevent .htaccess and .htpasswd files from being 
    # viewed by Web clients. 
    #
    <Files ".ht*">
        Require all denied
    </Files>
     
    #
    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here.  If you *do* define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    #
    ErrorLog "logs/error_log"
     
    #
    # LogLevel: Control the number of messages logged to the error_log.
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    #
    LogLevel warn
     
    <IfModule log_config_module>
        #
        # The following directives define some format nicknames for use with
        # a CustomLog directive (see below).
        #
        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
        LogFormat "%h %l %u %t \"%r\" %>s %b" common
     
        <IfModule logio_module>
          # You need to enable mod_logio.c to use %I and %O
          LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
        </IfModule>
     
        #
        # The location and format of the access logfile (Common Logfile Format).
        # If you do not define any access logfiles within a <VirtualHost>
        # container, they will be logged here.  Contrariwise, if you *do*
        # define per-<VirtualHost> access logfiles, transactions will be
        # logged therein and *not* in this file.
        #
        #CustomLog "logs/access_log" common
     
        #
        # If you prefer a logfile with access, agent, and referer information
        # (Combined Logfile Format) you can use the following directive.
        #
        CustomLog "logs/access_log" combined
    </IfModule>
     
    <IfModule alias_module>
        #
        # Redirect: Allows you to tell clients about documents that used to 
        # exist in your server's namespace, but do not anymore. The client 
        # will make a new request for the document at its new location.
        # Example:
        # Redirect permanent /foo http://www.example.com/bar
     
        #
        # Alias: Maps web paths into filesystem paths and is used to
        # access content that does not live under the DocumentRoot.
        # Example:
        # Alias /webpath /full/filesystem/path
        #
        # If you include a trailing / on /webpath then the server will
        # require it to be present in the URL.  You will also likely
        # need to provide a <Directory> section to allow access to
        # the filesystem path.
     
        #
        # ScriptAlias: This controls which directories contain server scripts. 
        # ScriptAliases are essentially the same as Aliases, except that
        # documents in the target directory are treated as applications and
        # run by the server when requested rather than as documents sent to the
        # client.  The same rules about trailing "/" apply to ScriptAlias
        # directives as to Alias.
        #
        ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
     
    </IfModule>
     
    #
    # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    <Directory "/var/www/cgi-bin">
        AllowOverride None
        Options None
        Require all granted
    </Directory>
     
    <IfModule mime_module>
        #
        # TypesConfig points to the file containing the list of mappings from
        # filename extension to MIME-type.
        #
        TypesConfig /etc/mime.types
     
        #
        # AddType allows you to add to or override the MIME configuration
        # file specified in TypesConfig for specific file types.
        #
        #AddType application/x-gzip .tgz
        #
        # AddEncoding allows you to have certain browsers uncompress
        # information on the fly. Note: Not all browsers support this.
        #
        #AddEncoding x-compress .Z
        #AddEncoding x-gzip .gz .tgz
        #
        # If the AddEncoding directives above are commented-out, then you
        # probably should define those extensions to indicate media types:
        #
        AddType application/x-compress .Z
        AddType application/x-gzip .gz .tgz
     
        #
        # AddHandler allows you to map certain file extensions to "handlers":
        # actions unrelated to filetype. These can be either built into the server
        # or added with the Action directive (see below)
        #
        # To use CGI scripts outside of ScriptAliased directories:
        # (You will also need to add "ExecCGI" to the "Options" directive.)
        #
        #AddHandler cgi-script .cgi
     
        # For type maps (negotiated resources):
        #AddHandler type-map var
     
        #
        # Filters allow you to process content before it is sent to the client.
        #
        # To parse .shtml files for server-side includes (SSI):
        # (You will also need to add "Includes" to the "Options" directive.)
        #
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
    </IfModule>
     
    #
    # Specify a default charset for all content served; this enables
    # interpretation of all content as UTF-8 by default.  To use the 
    # default browser choice (ISO-8859-1), or to allow the META tags
    # in HTML content to override this choice, comment out this
    # directive:
    #
    #AddDefaultCharset UTF-8
     
    <IfModule mime_magic_module>
        #
        # The mod_mime_magic module allows the server to use various hints from the
        # contents of the file itself to determine its type.  The MIMEMagicFile
        # directive tells the module where the hint definitions are located.
        #
        MIMEMagicFile conf/magic
    </IfModule>
     
    #
    # Customizable error responses come in three flavors:
    # 1) plain text 2) local redirects 3) external redirects
    #
    # Some examples:
    #ErrorDocument 500 "The server made a boo boo."
    #ErrorDocument 404 /missing.html
    #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    #
     
    #
    # EnableMMAP and EnableSendfile: On systems that support it, 
    # memory-mapping or the sendfile syscall may be used to deliver
    # files.  This usually improves server performance, but must
    # be turned off when serving from networked-mounted 
    # filesystems or if support for these functions is otherwise
    # broken on your system.
    # Defaults if commented: EnableMMAP On, EnableSendfile Off
    #
    #EnableMMAP off
    EnableSendfile on
     
    # Supplemental configuration
    #
    # Load config files in the "/etc/httpd/conf.d" directory, if any.
    IncludeOptional conf.d/*.conf
    GracefulShutDownTimeout 3
    AddOutputFilter INCLUDES .shtml
    AddType text/html .shtml
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    Le htaccess:
    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
    AddDefaultCharset UTF-8
    Options +Indexes
     
    RewriteEngine on
     
    RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,R=301]
     
    RewriteRule ^player/1/(.+)\.html$ /player/encrypt_video.php?code=$1 [L]
     
    RewriteRule ^tests/(.+)/$ /tests/index.php?page=$1 [L]
    RewriteRule ^tests/(.+)-video-(.+)-ld.html$ /tests/fiche_test.php?id=$2&type=ld [L]
    RewriteRule ^tests/(.+)-video-(.+)-hd.html$ /tests/fiche_test_hd.php?id=$2&type=hd [L]
    RewriteRule ^tests/(.+)-video-(.+).html$ /tests/fiche_test.php?id=$2&type=sd [L]
     
    RewriteRule ^actualites/(.+)/$ /actualites/index.php?page=$1 [L]
    RewriteRule ^actualites/(.+)-news-(.+).html$ /actualites/fiche_actu.php?id=$2 [L]
     
    RewriteRule ^reportages/(.+)/$ /reportages/index.php?page=$1 [L]
    RewriteRule ^reportages/(.+)-video-(.+)-ld.html$ /tests/fiche_test.php?id=$2&type=ld [L]
    RewriteRule ^reportages/(.+)-video-(.+)-hd.html$ /tests/fiche_test_hd.php?id=$2&type=hd [L]
    RewriteRule ^reportages/(.+)-video-(.+).html$ /tests/fiche_test.php?id=$2&type=sd [L]
     
    RewriteRule ^albums/(.+)/$ /albums/index.php?page=$1 [L]
    RewriteRule ^albums/(.+)-video-(.+)-hd.html$ /tests/fiche_test_hd.php?id=$2&type=hd [L]
    RewriteRule ^albums/(.+)-video-(.+)-ld.html$ /tests/fiche_test.php?id=$2&type=ld [L]
    RewriteRule ^albums/(.+)-video-(.+).html$ /tests/fiche_test.php?id=$2&type=sd [L]
     
    RewriteRule ^emissions/(.+)/$ /emissions/index.php?page=$1 [L]
    RewriteRule ^emissions/(.+)-video-(.+)-ld.html$ /tests/fiche_test.php?id=$2&type=ld [L]
    RewriteRule ^emissions/(.+)-video-(.+)-hd.html$ /tests/fiche_test_hd.php?id=$2&type=hd [L]
    RewriteRule ^emissions/(.+)-video-(.+).html$ /tests/fiche_test.php?id=$2&type=sd [L]
     
    RewriteRule ^cours/(.+)/$ /cours/index.php?page=$1 [L]
    RewriteRule ^cours/(.+)-cours_id-(.+)-ld.html$ /cours/fiche.php?id=$2&type=ld [L]
    RewriteRule ^cours/(.+)-cours_id-(.+)-hd.html$ /cours/fiche_hd.php?id=$2&type=hd [L]
    RewriteRule ^cours/(.+)-cours_id-(.+)-sd.html$ /cours/fiche.php?id=$2&type=sd [L]
    RewriteRule ^cours/(.+)-cours_id-(.+).html$ /cours/fiche_teaser.php?id=$2&type=te [L]
    RewriteRule ^cours/(.+)-achat_id-(.+).html$ /cours/achat_cours.php?id=$2 [L]
     
     
    RewriteRule ^infos/(.+).html$ /infos/index.php?url=$1 [L]
    RewriteRule ^infos-pop/(.+).html$ /infos/index-popup.php?url=$1 [L]
     
     
    RewriteRule ^(.*)-video-([0-9]+).html switch_url_video.php?video=$2 [L]
    RewriteRule ^actualite-([0-9]+).html switch_url_news.php?video=$1 [L]
     
    ErrorDocument  404  /404.php
     
    #########################################################
    # forum SEO REWRITE RULES				#
    #########################################################
    # AUTHOR : DCZ http://www.forum-seo.com/
    # STARTED : 01/2006
    ##################################################### 
    # FORUMS PAGES 
    ########################
    # FORUM INDEX (un-comment if used)
    # RewriteRule ^forum/index\.html$ /forum/index.php [QSA,L] 
    # FORUM PROTECTION RULE 
    # RewriteRule ^forum/.*/([^/]+\.html)$ /forum/index.php [R=301,L] 
    # CATEGORIES 
    RewriteRule ^forum/.*-c([0-9]+)\.html$ /forum/index.php?c=$1 [QSA,L] 
    # PAGINATED FORUM
    RewriteRule ^forum/.*-f([0-9]+)-([0-9]+)\.html$ /forum/viewforum.php?f=$1&start=$2 [QSA,L] 
    # FORUM 
    RewriteRule ^forum/.*-f([0-9]+)\.html$ /forum/viewforum.php?f=$1 [QSA,L] 
    # PAGINATED TOPIC 
    RewriteRule ^forum/.*-t([0-9]+)-([0-9]+)\.html$ /forum/viewtopic.php?t=$1&start=$2 [QSA,L] 
    # TOPIC 
    RewriteRule ^forum/.*-t([0-9]+)\.html$ /forum/viewtopic.php?t=$1 [QSA,L] 
    # POST 
    RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L] 
    #PROFILES 
    RewriteRule ^forum/membre([0-9]+)\.html$ /forum/profile.php?mode=viewprofile&u=$1 [QSA,L] 
    # END forum PAGES 
    #####################################################
     
    #####################################################contrôle du cache navigateur
    ## contrôle du cache navigateur - Expire headers  
        <IfModule mod_expires.c>  
            ExpiresActive On  
            ExpiresDefault "access plus 7200 seconds"  
            ExpiresByType image/jpg             "access plus 1 week"  
            ExpiresByType image/jpeg            "access plus 1 week"  
            ExpiresByType image/png             "access plus 1 week"  
            ExpiresByType image/gif             "access plus 1 week"  
            AddType image/x-icon .ico  
            ExpiresByType image/ico             "access plus 1 week"  
            ExpiresByType image/icon            "access plus 1 week"  
            ExpiresByType image/x-icon          "access plus 1 week"  
            ExpiresByType text/css              "access plus 1 week"  
            ExpiresByType text/javascript       "access plus 1 week"  
            ExpiresByType text/html             "access plus 7200 seconds"  
            ExpiresByType application/xhtml+xml     "access plus 7200 seconds"  
            ExpiresByType application/javascript    "access plus 1 week"  
            ExpiresByType application/x-javascript  "access plus 1 week"  
            ExpiresByType application/x-shockwave-flash "access plus 1 week"  
        </IfModule>
     
    	## Mise en cache cache-control
    	<IfModule mod_headers.c>
    	<FilesMatch "\\.(ico|jpe?g|png|gif|swf)$">
    		Header set Cache-Control "max-age=2592000, public"
    	</FilesMatch>
    	<FilesMatch "\\.(css)$">
    		Header set Cache-Control "max-age=2592000, public"
    	</FilesMatch>
    	<FilesMatch "\\.(js)$">
    		Header set Cache-Control "max-age=2592000, private"
    	</FilesMatch>
    	<FilesMatch "\\.(x?html?|php)$">
    		Header set Cache-Control "max-age=600, private, must-revalidate"
    	</FilesMatch>
     
    	Header unset ETag
        FileETag none
    #####################################################contrôle du cache navigateur
     
    # MOD_DEFLATE COMPRESSION
    SetOutputFilter DEFLATE
    AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/x-httpd-php
    #Pour les navigateurs incompatibles
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    #ne pas mettre en cache si ces fichiers le sont déjà
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
    #les proxies doivent donner le bon contenu
    Header append Vary User-Agent env=!dont-vary
    Les DNS du nom de domaine sont bien déclarés pointant vers le serveur auprès du fournisseur.

  2. #2
    Expert éminent sénior
    Avatar de mathieu
    Profil pro
    Inscrit en
    juin 2003
    Messages
    7 115
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : juin 2003
    Messages : 7 115
    Points : 11 203
    Points
    11 203

    Par défaut

    qu'est ce que voulez dire par "la page d'accueil ne s affiche pas" ? quel est le résultat quand on essaye d'accéder à cette page ?

  3. #3
    Membre du Club
    Homme Profil pro
    Inscrit en
    septembre 2012
    Messages
    170
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : septembre 2012
    Messages : 170
    Points : 43
    Points
    43

    Par défaut

    J'ai depuis trouvé un truc étrange. En plus du fichier http.conf situé dans etc/httpd/conf il y a deux fichiers de config situés dans /var/www/vhosts/system/nomdedemaine/conf qui se nomment httpd.conf et nginx.conf qui sont générés automatiquement après les commandes effectuées dans le plesk. Ayant arrêté le service nginx, je ne m'occupe pas du fichier nginx.conf et voilà ce que donne le fichier httpd.conf de ce dossier

    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
     
    #ATTENTION!
    #
    #DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
    #SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
    #IF YOU REQUIRE TO APPLY CUSTOM MODIFICATIONS, PERFORM THEM IN THE FOLLOWING FILES:
    #/var/www/vhosts/system/nomdemonsite/conf/vhost.conf
     
    <VirtualHost 54.37.81.44:80 >
    	ServerName "nomdemonsite:80"
    	ServerAlias "www.nomdemonsite.com"
    	ServerAlias "ipv4.nomdemonsite.com"
    	ServerAdmin "monmail"
    	UseCanonicalName Off
     
    	DocumentRoot "/var/www/vhosts/nomdemonsite/httpdocs/guitare"
    	CustomLog /var/www/vhosts/system/nomdemonsite/logs/access_log plesklog
    	ErrorLog "/var/www/vhosts/system/nomdemonsite/logs/error_log"
     
    	<IfModule mod_suexec.c>
    		SuexecUserGroup "nomutilisateurdemonsite" "psacln"
    	</IfModule>
     
    	<IfModule mod_userdir.c>
     
    		UserDir "/var/www/vhosts/nomdemonsite/web_users/*"
    	</IfModule>
     
    	<IfModule mod_sysenv.c>
    		SetSysEnv PP_VHOST_ID "cc0a157f-5245-47bf-abd8-5118f5c398d9"
    	</IfModule>
     
    	ScriptAlias "/cgi-bin/" "/var/www/vhosts/nomdemonsite/httpdocs/guitare/cgi-bin/"
     
    	Alias "/plesk-stat" "/var/www/vhosts/system/nomdemonsite/statistics"
    	<Location  /plesk-stat/>
    		Options +Indexes
    	</Location>
    	<Location  /plesk-stat/logs/>
    		Require valid-user
    	</Location>
    	Alias /webstat /var/www/vhosts/system/nomdemonsite/statistics/webstat
    	Alias /webstat-ssl /var/www/vhosts/system/nomdemonsite/statistics/webstat-ssl
    	Alias /ftpstat /var/www/vhosts/system/nomdemonsite/statistics/ftpstat
    	Alias /anon_ftpstat /var/www/vhosts/system/nomdemonsite/statistics/anon_ftpstat
    	Alias /awstats-icon /var/www/html/awstats/icon
     
    	<IfModule mod_ssl.c>
    		SSLEngine off
    	</IfModule>
     
    	<Directory /var/www/vhosts/nomdemonsite/httpdocs/guitare>
     
    		<IfModule mod_fcgid.c>
    			<Files ~ (\.fcgi$)>
    				SetHandler fcgid-script
    				Options +ExecCGI
    			</Files>
    		</IfModule>
    		<IfModule mod_proxy_fcgi.c>
    			<Files ~ (\.php$)>
    				SetHandler proxy:unix:///var/www/vhosts/system/nomdemonsite/php-fpm.sock|fcgi://127.0.0.1:9000
    			</Files>
    		</IfModule>
     
    		Options -Includes +ExecCGI
     
    	</Directory>
     
    	<Directory "/var/www/vhosts/system/nomdemonsite/statistics">
    		AuthType Basic
    		AuthName "Statistiques du domaine"
    		AuthUserFile "/var/www/vhosts/system/nomdemonsite/pd/d..httpdocs@plesk-stat"
    		require valid-user
    	</Directory>
     
    	Alias /error_docs /var/www/vhosts/nomdemonsite/error_docs
    	ErrorDocument 400 /error_docs/bad_request.html
    	ErrorDocument 401 /error_docs/unauthorized.html
    	ErrorDocument 403 /error_docs/forbidden.html
    	ErrorDocument 404 /error_docs/not_found.html
    	ErrorDocument 500 /error_docs/internal_server_error.html
    	ErrorDocument 405 /error_docs/method_not_allowed.html
    	ErrorDocument 406 /error_docs/not_acceptable.html
    	ErrorDocument 407 /error_docs/proxy_authentication_required.html
    	ErrorDocument 412 /error_docs/precondition_failed.html
    	ErrorDocument 414 /error_docs/request_uri_too_long.html
    	ErrorDocument 415 /error_docs/unsupported_media_type.html
    	ErrorDocument 501 /error_docs/not_implemented.html
    	ErrorDocument 502 /error_docs/bad_gateway.html
    	ErrorDocument 503 /error_docs/maintenance.html
     
    	IncludeOptional "/usr/local/psa/admin/conf/file_sharing.conf*"
     
    	<IfModule mod_security2.c>
    	</IfModule>
     
    </VirtualHost>
    La page d'accueil s'affiche enfin mais pour autant tous les liens (même si au survol affichent la bonne direction) ne sont toujours pas redirigés correctement et on tombe que sur des pages "Error 500". De plus il n existe pas de fichier vhost.conf dans le dossier /var/www/vhosts/system/nomdemonsite/conf/vhost.conf comme mentionné dans le httpd.conf mais uniquement le fichier vhost_nginx.conf
    Du coup je comprends pas pourquoi le fichier htaccess ne prend pas la relève. Et doit on ou que faut il modifier entre ces deux fichiers httpd.conf ??

Discussions similaires

  1. soucis avec url rewrite et htaccess
    Par cameleon93 dans le forum Débuter
    Réponses: 8
    Dernier message: 25/04/2009, 19h32
  2. url rewriting dans htaccess
    Par dl_jarod dans le forum Apache
    Réponses: 1
    Dernier message: 04/11/2008, 18h51
  3. Réponses: 8
    Dernier message: 03/10/2008, 15h38
  4. Réponses: 5
    Dernier message: 27/03/2008, 17h45
  5. [URL Rewriting] mon .htaccess tue mon css
    Par 7studio dans le forum Apache
    Réponses: 1
    Dernier message: 04/01/2008, 20h56

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