Redirection ip avec apache
Fermé
boriskov
Messages postés
4
Date d'inscription
jeudi 10 juillet 2008
Statut
Membre
Dernière intervention
15 juillet 2008
-
10 juil. 2008 à 09:02
Ly86 Messages postés 73 Date d'inscription mercredi 9 juillet 2008 Statut Membre Dernière intervention 17 décembre 2008 - 10 juil. 2008 à 09:22
Ly86 Messages postés 73 Date d'inscription mercredi 9 juillet 2008 Statut Membre Dernière intervention 17 décembre 2008 - 10 juil. 2008 à 09:22
A voir également:
- Redirection ip avec apache
- Ethernet n'a pas de configuration ip valide - Guide
- Comment connaître son adresse ip - Guide
- Apache openoffice - Télécharger - Suite bureautique
- Ip local - Guide
- Comment savoir si quelqu'un utilise mon adresse ip - Guide
3 réponses
boriskov
Messages postés
4
Date d'inscription
jeudi 10 juillet 2008
Statut
Membre
Dernière intervention
15 juillet 2008
1
10 juil. 2008 à 09:12
10 juil. 2008 à 09:12
voici le contenu de mon fichier etc/apache2/sites-available :
NameVirtualHost *:80
ServerName 192.168.1.30
ProxyPreserveHost On
<VirtualHost *:80>
ServerAdmin webmaster@localhost
<proxy *>
Options +FollowSymLinks
AllowOverride All
order allow,deny
allow from all
</proxy>
<Location /test/ >
ProxyPass http://192.168.1.130/
ProxyPassReverse http://192.168.1.130/
</Location>
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>NameVirtualHost *:80
ServerName 192.168.1.30
ProxyPreserveHost On
<VirtualHost *:80>
ServerAdmin webmaster@localhost
<proxy *>
Options +FollowSymLinks
AllowOverride All
order allow,deny
allow from all
</proxy>
<Location /test/ >
ProxyPass http://192.168.1.130/
ProxyPassReverse http://192.168.1.130/
</Location>
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</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 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>
</VirtualHost>
NameVirtualHost *:80
ServerName 192.168.1.30
ProxyPreserveHost On
<VirtualHost *:80>
ServerAdmin webmaster@localhost
<proxy *>
Options +FollowSymLinks
AllowOverride All
order allow,deny
allow from all
</proxy>
<Location /test/ >
ProxyPass http://192.168.1.130/
ProxyPassReverse http://192.168.1.130/
</Location>
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>NameVirtualHost *:80
ServerName 192.168.1.30
ProxyPreserveHost On
<VirtualHost *:80>
ServerAdmin webmaster@localhost
<proxy *>
Options +FollowSymLinks
AllowOverride All
order allow,deny
allow from all
</proxy>
<Location /test/ >
ProxyPass http://192.168.1.130/
ProxyPassReverse http://192.168.1.130/
</Location>
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</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 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>
</VirtualHost>
Ly86
Messages postés
73
Date d'inscription
mercredi 9 juillet 2008
Statut
Membre
Dernière intervention
17 décembre 2008
5
10 juil. 2008 à 09:12
10 juil. 2008 à 09:12
Bonjour.
Pour ta DMZ tu utilise le même réseau que pour ton LAN : 192.168.1.0 /32 ?
Sans vouloir dire de bétise le shéma classique serait : internet -> pare-feu/Proxy -> DMZ
-> LAN
Un réseau pour la DMZ connecté au Proxy
Et un réseau pour ton LAN qui est connecté a une autre patte de ton Proxy
Lorsque qu'une IP arrive du WAN sur ton Proxy tu redirige cette adresse sur le serveur voulu.
Pour ta DMZ tu utilise le même réseau que pour ton LAN : 192.168.1.0 /32 ?
Sans vouloir dire de bétise le shéma classique serait : internet -> pare-feu/Proxy -> DMZ
-> LAN
Un réseau pour la DMZ connecté au Proxy
Et un réseau pour ton LAN qui est connecté a une autre patte de ton Proxy
Lorsque qu'une IP arrive du WAN sur ton Proxy tu redirige cette adresse sur le serveur voulu.
boriskov
Messages postés
4
Date d'inscription
jeudi 10 juillet 2008
Statut
Membre
Dernière intervention
15 juillet 2008
1
10 juil. 2008 à 09:14
10 juil. 2008 à 09:14
en réalité si ces deux serveur se trouvent sur le même réseau c'est juste afin de faire des teste . une fois les test réussit, cette redirection se fera vers le vrai serveur web du LAN qui possede une adresse du type :
172.16.1.5
172.16.1.5
10 juil. 2008 à 09:22
Donc ton but est de rediriger d'un serveur Web à un autre serveur Web.
Lorsque tes utilisateurs arrive sur la page index d'apache (ou une autre page) pourquoi ne fais tu fais un lien pour les redirigés vers ton autre serveur ou tu leur demanderai de s'authentifié