Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[apache] cloisonnement des virtualhost (résolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
mr-ti
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2006
Posts: 97
Location: Tours

PostPosted: Fri Nov 21, 2008 4:56 pm    Post subject: [apache] cloisonnement des virtualhost (résolu) Reply with quote

Bonjour tout le monde,

Voici une arborescence à titre indicatif :
- /http/vh1
- /http/vh2
J'utilise un serveur apache et je voudrais cloisonner chacun des virtualhost que /http/vh1 ne puisse pas aller dans /http/vh2 ni dans un dossier parent.

1 : le chroot pourrais faire l'affaire mais on ne peux pas chrooter chaque virtualhost indépendamment
2 : je voudrais éviter de devoir utiliser suexec

des idées ?

merci d'avance...


Last edited by mr-ti on Sat Nov 22, 2008 5:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
Tony Clifton
l33t
l33t


Joined: 07 Jul 2004
Posts: 686
Location: Rennes

PostPosted: Sat Nov 22, 2008 11:30 am    Post subject: Reply with quote

Code:

<VirtualHost *:80>
        DocumentRoot "/http/vh1"
        ServerName "vh1"
        <Directory /http/vh1>
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
        ErrorLog /var/log/apache2/vh1-error.log
        CustomLog /var/log/apache2/vh1-access.log combined
</VirtualHost>
<VirtualHost *:80>
        DocumentRoot "/http/vh2"
        ServerName "vh2"
        <Directory /http/vh2>
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
        ErrorLog /var/log/apache2/vh2-error.log
        CustomLog /var/log/apache2/vh2-access.log combined
</VirtualHost>


Un truc comme ça, te convient ?
_________________
La seule certitude que j'ai, c'est d'être dans le doute ! P. Desproges
Back to top
View user's profile Send private message
SnowBear
l33t
l33t


Joined: 03 Sep 2005
Posts: 773
Location: France - Bordeaux

PostPosted: Sat Nov 22, 2008 12:16 pm    Post subject: Reply with quote

Tony Clifton wrote:
Code:

<VirtualHost *:80>
        DocumentRoot "/http/vh1"
        ServerName "vh1"
        <Directory /http/vh1>
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
        ErrorLog /var/log/apache2/vh1-error.log
        CustomLog /var/log/apache2/vh1-access.log combined
</VirtualHost>
<VirtualHost *:80>
        DocumentRoot "/http/vh2"
        ServerName "vh2"
        <Directory /http/vh2>
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
        ErrorLog /var/log/apache2/vh2-error.log
        CustomLog /var/log/apache2/vh2-access.log combined
</VirtualHost>


Un truc comme ça, te convient ?


Salut,
ça n'empèche pas à un script placé dans /http/vh2 d'aller voir dans /http/vh1 ou ailleurs.
tu peux utiliser le mode dev-php5/suhosin pour interdire aux script php d'aller voir ailleurs que là ou tu veux.
Back to top
View user's profile Send private message
mr-ti
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2006
Posts: 97
Location: Tours

PostPosted: Sat Nov 22, 2008 2:57 pm    Post subject: Reply with quote

SnowBear wrote:
Tony Clifton wrote:
Code:

...


Un truc comme ça, te convient ?


Salut,
ça n'empèche pas à un script placé dans /http/vh2 d'aller voir dans /http/vh1 ou ailleurs.
tu peux utiliser le mode dev-php5/suhosin pour interdire aux script php d'aller voir ailleurs que là ou tu veux.


en effet tu a bien cerné le problème et merci pour ta réponse, je vais voir de ce côté !
Back to top
View user's profile Send private message
mr-ti
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2006
Posts: 97
Location: Tours

PostPosted: Sat Nov 22, 2008 5:17 pm    Post subject: Reply with quote

voilà j'ai trouvé la solution qui me convient le mieux :
il suffit de mettre
Code:

php_admin_value open_basedir "/data/vh1/"

dans la config du virtualhost
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum