Pages : 1
#1 Le 27/05/2006, à 12:22
- tekman54000
mod rewrite apache2?!
Salut a tous,
J'ai un serveur apache2 configuré a souhait...Cependant afin d'améliorer la secu, j'aimerai passer le site completement en SSL...Le seul soucis, c'est que les client qui s'y connectent entrent tous http://IP au lieu de https://IP j'ai cherché sur gogole et j'ai vu que apache2 dispose d'un mod qui permet la redirection d'une url http:// vers https:// mais je n'ai pas reussi a la faire fonctionner. j'ai suivi le post: http://forum.ubuntu-fr.org/viewtopic.php?id=24293 mais a marhce pôô lol... je précise j'ai bien activé a2enmod rewrite mais j'ai toujours une erreur 400 Bad Request...
QUelqu'un a t il une idée?
------------------------------------------------------------------------------------------------
"The day Microsoft makes something that doesn’t suck is probably the day they start making vacuum cleaners" Ernst Jan Plugge
------------------------------------------------------------------------------------------------
Hors ligne
#2 Le 27/05/2006, à 12:43
- CeReAl KiLLeR Du 77
Re : mod rewrite apache2?!
Oulà, moi j'ai plus simple!!!
Tu cole dans ton virtualhost ceci
Redirect / https://tonsite.domain.tld
et le tour est joué C'est ce que je fais pour l'accès au webmail, phpmyadmin, no problème
SuperBox = Serveur (FreeBSD 7.2) (DEAD) | H²O = Serveur (FreeBSD 8.1) | Nephrotique = Desktop (Ubuntu Lucid Lynx 64 bits) | Skizophrene = Laptop (DesktopBSD 1.7/WinXP SP3) | Epileptik = Desktop (Diskless) | WRT54GL 1.1 (Openwrt Backfire 10.3 noyau 2.4) | WRT54GL 1.1 (DDWRT V24 SP1)
Hors ligne
#3 Le 27/05/2006, à 14:42
- tekman54000
Re : mod rewrite apache2?!
ouaip sauf que je n'ai pas de virtual host j'ai 2 alias dans ma config je la colle ci dessous :
NameVirtualHost 192.168.0.1:80
DocumentRoot /home/http/interfaceftp
Alias /interface/ "/home/ftp/interfaceftp/"
<Directory /home/ftp/interfaceftp>
AllowOverride All
Options Indexes FollowSymLinks Includes
Allow from all
#ServerName 192.168.0.1:80
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]
</Directory>
Alias /phpmyadmin "/var/www/phpmyadmin/"
<Directory /var/www/phpmyadmin/>
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/phpmyadmin/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Alias /stats "/home/http/interfaceftp/Stats/"
<Directory /home/http/interfaceftp/Stats>
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/http/interfaceftp/stats>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
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/errortmn.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
# Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
et le rewrite change rien lol
Dernière modification par tekman54000 (Le 27/05/2006, à 14:43)
------------------------------------------------------------------------------------------------
"The day Microsoft makes something that doesn’t suck is probably the day they start making vacuum cleaners" Ernst Jan Plugge
------------------------------------------------------------------------------------------------
Hors ligne
#4 Le 27/05/2006, à 20:42
- tekman54000
Re : mod rewrite apache2?!
un ptit up
------------------------------------------------------------------------------------------------
"The day Microsoft makes something that doesn’t suck is probably the day they start making vacuum cleaners" Ernst Jan Plugge
------------------------------------------------------------------------------------------------
Hors ligne
#5 Le 28/05/2006, à 08:01
- tekman54000
Re : mod rewrite apache2?!
un re ptit up... Personne ne pourrait m'aider????
------------------------------------------------------------------------------------------------
"The day Microsoft makes something that doesn’t suck is probably the day they start making vacuum cleaners" Ernst Jan Plugge
------------------------------------------------------------------------------------------------
Hors ligne
#6 Le 28/05/2006, à 17:42
- tekman54000
Re : mod rewrite apache2?!
re up cereal killer reponds moi jten prie lol
------------------------------------------------------------------------------------------------
"The day Microsoft makes something that doesn’t suck is probably the day they start making vacuum cleaners" Ernst Jan Plugge
------------------------------------------------------------------------------------------------
Hors ligne
#7 Le 28/05/2006, à 19:50
- CeReAl KiLLeR Du 77
Re : mod rewrite apache2?!
J'suis là!
Tu colle la ligne sur ta config et tu test! Je n'ai plus de serveur sous la main actuellement pour voir. Je rencontre justement des soucis avc mon serveur qui partage la connection internet, et l'autre, il ne possède plus de disque dur, j'ai du le retirer, et j'attend le nouveau qui devrais revenir demain.
Sachant qu'avec sa tu auras normalement accès en https pour tes alias. Tu ne sera plus sur le port 80 qui est celui par défault. Donc je pense que ce n'ai pas la solution adéquate.
Dernière modification par CeReAl KiLLeR Du 77 (Le 28/05/2006, à 19:51)
SuperBox = Serveur (FreeBSD 7.2) (DEAD) | H²O = Serveur (FreeBSD 8.1) | Nephrotique = Desktop (Ubuntu Lucid Lynx 64 bits) | Skizophrene = Laptop (DesktopBSD 1.7/WinXP SP3) | Epileptik = Desktop (Diskless) | WRT54GL 1.1 (Openwrt Backfire 10.3 noyau 2.4) | WRT54GL 1.1 (DDWRT V24 SP1)
Hors ligne
#8 Le 28/05/2006, à 20:47
- tekman54000
Re : mod rewrite apache2?!
comment ca je colle la ligne sur la config? je colle quoi, ou? lol pas tout compris la lol
------------------------------------------------------------------------------------------------
"The day Microsoft makes something that doesn’t suck is probably the day they start making vacuum cleaners" Ernst Jan Plugge
------------------------------------------------------------------------------------------------
Hors ligne
Pages : 1