Précédent   Forum des professionnels en informatique > Systèmes > Linux > Réseau
Réseau Vos questions autour des réseaux et télécoms sous Linux
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 28/08/2011, 15h41   #1
Membre du Club
 
Inscription : janvier 2007
Messages : 196
Détails du profil
Informations forums :
Inscription : janvier 2007
Messages : 196
Points : 54
Points : 54
Par défaut erreur sous domaines dynamique

Bonjour,

Je vous écris car j'ai un soucis de sous domaines j'ai bien mon sous domaine actif

ou l'adresse est http://nom.domaine.com qui est redirigé vers http://www.domaine.com/blog/nom/

mais quand je suis sur http://nom.domaine.com les url sont vers http://www.domaine.com/blog

hors ce que je souhaiterais c'est que dans les url cela affiche bien le htto://nom.domaine.com !

donc ma question est, comment je peux faire, pour que les scripts de mes sous domaines fonctionen mais en fonction de http://nom.domaine.com et pas en fonction de http://nom.domaine.com voilà les fichiers acces et vhost

le .httaccess
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
 
RewriteBase /sd/blog/
 
RewriteCond %{HTTP_HOST}    !^<a href="http://www.domaine.com" target="_blank">www.domaine.com</a>
RewriteCond %{HTTP_HOST}    !^.domaine.com 
RewriteCond %{HTTP_HOST}    ^([^.]+).domaine.com
RewriteRule ^$              /sd/blog/%1/ [L]
 
 
ErrorDocument 404 <a href="http://www.domaine.com/404.php" target="_blank">http://www.domaine.com/404.php</a> 
 
RewriteRule ^article_([^.]+).html$  /sd/blog/%1/view.php?idarticle=$1 [L]
RewriteRule ^comment_([^.]+).html$  /%1/lire_comment.php?idarticle=$1 [L]
RewriteRule ^ajout_comment_([^.]+)_([^.]+).html$  /%1/ajout_comment.php?idarticle=$1&idblog=$2 [L] 
RewriteRule ^comment_([^.]+)_([^.]+).html$  /%1/lire_comment.php?idarticle=$1&go=$2 [L] 
 
RewriteRule ^photo_([^.]+).html$  /var/www/domaine.com/web/sd/blog/%1/photo.php?idarticle=$1 [L]
le vhost domaine.fr.vhost
Code :
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
 
<Directory /var/www/******.fr>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>
 
 
<VirtualHost 46.105.125.154:80>
      DocumentRoot /var/www/*****.fr/web
 
    ServerName ****.fr
     ServerAlias *.*****.fr
    ServerAlias blog.*****.fr
    ServerAdmin <a href="mailto:webmaster@****.fr">webmaster@****.fr</a>
 
 
 
    ErrorLog /var/log/ispconfig/httpd/w*****/error.log
 
 
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 503 /error/503.html
 
<Directory /var/www/clients/client0/web6/web/sd/blog>
   Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
 
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
    </Directory>
 
    <Directory /var/www/*****/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
 
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
    </Directory>
    <Directory /var/www/clients/client0/web6/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
 
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
    </Directory>
 
    <IfModule mod_ruby.c>
      <Directory /var/www/clients/client0/web6/web>
        Options +ExecCGI
      </Directory>
      RubyRequire apache/ruby-run
      #RubySafeLevel 0
      <Files *.rb>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
      <Files *.rbx>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
    </IfModule>
 
    # cgi enabled
        <Directory /var/www/clients/client0/web6/cgi-bin>
      Order allow,deny
      Allow from all
    </Directory>
    ScriptAlias  /cgi-bin/ /var/www/clients/client0/web6/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    # suexec enabled
    SuexecUserGroup web6 client0
    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
    <IfModule mod_fcgid.c>
 
          # SocketPath /tmp/fcgid_sock/
 
          # IdleTimeout n (3600 seconds)
          # An idle fastcgi application will be terminated after IdleTimeout seconds.
      IdleTimeout 3600
 
          # ProcessLifeTime n (7200 seconds)
      # A fastcgi application will be terminated if lifetime expired, even no error is detected.
      ProcessLifeTime 7200
 
          # MaxProcessCount n (1000)
      # The max count of total fastcgi process count.
      # MaxProcessCount 1000
 
          # DefaultMinClassProcessCount n (3)
      # The minimum number of fastcgi application instances for any one fastcgi application.
      # Idle fastcgi will not be killed if their count is less than n
      # Set this to 0, and tweak IdleTimeout
          DefaultMinClassProcessCount 0
 
          # DefaultMaxClassProcessCount n (100)
      # The maximum number of fastcgi application instances allowed to run for
      # particular one fastcgi application.
      DefaultMaxClassProcessCount 100
 
          # IPCConnectTimeout n (3 seconds)
      # The connect timeout to a fastcgi application.
      IPCConnectTimeout 8
 
          # IPCCommTimeout n (20 seconds)
      # The communication timeout to a fastcgi application. Please increase this
      # value if your CGI have a slow initialization or slow respond.
      IPCCommTimeout 360
 
          # BusyTimeout n (300 seconds)
      # A fastcgi application will be terminated if handing a single request
      # longer than busy timeout.
          BusyTimeout 300
 
    </IfModule>
    <Directory /var/www/*****/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web6/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
        <Directory /var/www/clients/client0/web6/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web6/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
 
    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^blog.wembook.fr [NC]
    RewriteRule   ^/(.*)$ /var/www/clients/client0/web6/web/sd/blog/$1  [R,L]
 
    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web6 client0
    </IfModule>
 
    <IfModule mod_dav_fs.c>
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>
 
 
</VirtualHost>
 
<VirtualHost *:80>
    DocumentRoot /var/www/******/web   
 ServerName *****.**
    ServerAlias *.****.****
    VirtualDocumentRoot /var/www/clients/client0/web6/web/sd/blog/%1
 
</VirtualHost>
merci de votre aide
toulousain3117 est déconnecté   Envoyer un message privé Réponse avec citation 10
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 14h31.


 
 
 
 
Partenaires

Hébergement Web