Redirection par proxy et trailing slash
Bonjour à tous.
Je vous explique mon probleme.
Je suis en train de configurer un serveur Apache et je ne trouve pas de solution à un probleme.
En effet, je redirirge le port 80 sur le port 81 pour toute les addresses sauf les address se terminant par "vhs"
Cela fonctionne correctement sauf que si je ne fini pas mes adresses par / cela ne fonctionne plus. Exemple
Je tape http://address.chezmoi.com/toto/ et le serveur me redirige bien via le loopback interne et le port 81 (127.0.0.1:81) sur l'alias toto
Je tape http://address.chezmoi.com/toto et la le serveur me redirige vers http://address.chezmoi.com:81/toto/ qui eveidement ne pointe vers rien puisque le port 81 est fermé de l'exterieur.
Que faire?
Pouvez vou m'aider ?
Je vous poste mes fichiers de conf apache
fichier des Vhost port 80
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
| <VirtualHost *:80>
ServerAdmin webmaster@localhost
ProxyPassMatch ^/vhs4portal(.*)|^/vhs(.*) !
ProxyPass / http://127.0.0.1:81/
ProxyPassReverse / http://127.0.0.1:81/
ProxyPreserveHost On
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride Limit FileInfo Options
Order allow,deny
Allow from all
</Directory>
Alias /vhs /var/www/vhs4portal
<Directory /var/www/vhs4portal>
Options Indexes FollowSymLinks MultiViews
AllowOverride Limit FileInfo Options
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
SSLEngine On
SSLCertificateFile ssl/vhs4ssl.crt
SSLCertificateKeyFile ssl/vhs4ssl.key
SSLProxyEngine on
ProxyPassMatch ^/vhs4portal(.*)|^/vhs(.*) !
ProxyPass / https://127.0.0.1:444/
ProxyPassReverse / https://127.0.0.1:444/
ProxyPreserveHost On
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride Limit FileInfo Options
Order allow,deny
Allow from all
</Directory>
Alias /vhs /var/www/vhs4portal
<Directory /var/www/vhs4portal>
Options Indexes FollowSymLinks MultiViews
AllowOverride Limit FileInfo Options
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
</VirtualHost> |
fichier des VirtualHost sur le port 81
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
| NameVirtualHost *:81
<VirtualHost *:81>
ServerAdmin webmaster@localhost
<Directory />
Options FollowSymLinks
AllowOverride None
Allow from all
</Directory>
Include /etc/apache2/sites-created-users/http_alias/*
DocumentRoot /var/default/
<Directory /var/default/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
</VirtualHost>
#include all http vhosts
Include /etc/apache2/sites-created-users/http_vhosts/*
NameVirtualHost *:444
<VirtualHost *:444>
ServerAdmin webmaster@localhost
SSLEngine On
SSLCertificateFile ssl/vhs4ssl.crt
SSLCertificateKeyFile ssl/vhs4ssl.key
<Directory />
Options FollowSymLinks
AllowOverride None
Allow from all
</Directory>
Include /etc/apache2/sites-created-users/https_alias/*
DocumentRoot /var/default/
<Directory /var/default/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
</VirtualHost>
#include all https vhosts
Include /etc/apache2/sites-created-users/https_vhosts/* |
fichier des vhost rajouté on the fly lors de creation de sites
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| <VirtualHost *:444>
ServerName address1.dyndns.org:444
Alias /gegefofo /var/www/admin/gege
<Directory /var/www/admin/gege>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Allow from all
</Directory>
DocumentRoot /var/www/admin/tata
<Directory /var/www/admin/tata>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Allow from all
</Directory>
Alias /lespotosdlarando /var/www/admin/toto
<Directory /var/www/admin/toto>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Allow from all
</Directory>
</VirtualHost> |