View previous topic :: View next topic |
Author |
Message |
Rman n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Apr 2007 Posts: 6
|
Posted: Tue Apr 24, 2007 5:04 pm Post subject: [apache]Problème avec les Vhost |
|
|
Bonsoir,
Je possède actuellement un serveur dédié Kimsufi chez OVH avec une distribution prête à l'emploi Gentoo. (Release 2) avec Webmin.
Souhaitons créer une plateforme de blog, il me faut utiliser des VirtualHost afin de pouvoir créer des nom de domaine automatiquement.
Voila ce que j'ai mit dans httpd.conf
Code: | <VirtualHost *:80>
ServerAdmin webmaster@monsite.fr
DocumentRoot /home/monsite/www
SuexecUserGroup monsite users
ServerName www.monsite.fr
ServerAlias *.monsite.fr
UseCanonicalName Off
VirtualDocumentRoot /home/monsite/www/blog/user/%1
CustomLog logs/monsite-access_log combined
ScriptAlias /cgi-bin/ /home/monsite/cgi-bin/
AddHandler x-httpd-php5 .php
</VirtualHost> |
Et voici l'erreur que me retourne apache lorsque je le redémarre :
Code: | Invalid command 'VirtualDocumentRoot', perhaps mis-spelled or defined by a module not included in the server configuration |
Après m'être renseigné dans divers forum, j'en ai déduit que le mod Vhost n'était pas installé.
J'ai lu qu'il fallait recompiler apache.
Je cherche donc une solution pour que cela fonctionne.
Merci d'avance ![Wink :wink:](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
geekounet Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/42499887147a7828d56a1b.png)
Joined: 11 Oct 2004 Posts: 3772
|
Posted: Tue Apr 24, 2007 5:49 pm Post subject: |
|
|
Pour la configuration des vhost, ça se passe dans /etc/apache2/vhosts.d/ tout simplement, t'y trouveras des exemples ![Wink ;)](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Rman n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Apr 2007 Posts: 6
|
Posted: Tue Apr 24, 2007 7:46 pm Post subject: |
|
|
Merci pour ta réponse mais la distribution toute prête d'OVH est différente d'une standard.
Ici apache ce situe dans /usr/local/apache/
Voici ce qu'il contient :
Code: | bin cgi-bin error icons lib man modules
build conf htdocs include logs manual |
Et lorsque je fait une recherche avec locate après un upgrade, je ne trouve aucun vhosts.d
J'ai cru lire qu'il fallait recompiler apache avec le mod vhosts le problème c'est que je ne sait pas comment faire et je ne veut pas perdre ma configuration actuelle car j'ai déjà plusieurs site en fonction sur mon serveur.
Merci d'avance |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Rman n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Apr 2007 Posts: 6
|
Posted: Sun Apr 29, 2007 8:33 pm Post subject: |
|
|
Un petit up car la survie de mon projet en dépend. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
geekounet Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/42499887147a7828d56a1b.png)
Joined: 11 Oct 2004 Posts: 3772
|
Posted: Sun Apr 29, 2007 8:50 pm Post subject: |
|
|
Le mieux avec les dédiés d'OVH, c'est de virer tout leur overlay, et de refaire une gentoo propre, avec un apache et un php compilés comme il faut ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
boozo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/83658268945e337605eec8.gif)
Joined: 01 Jul 2004 Posts: 3193
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
paolo20110 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Apr 2007 Posts: 1
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Oupsman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 Jul 2004 Posts: 1042
|
Posted: Mon Apr 30, 2007 4:10 am Post subject: |
|
|
geekounet wrote: | Le mieux avec les dédiés d'OVH, c'est de virer tout leur overlay, et de refaire une gentoo propre, avec un apache et un php compilés comme il faut ![Smile :)](images/smiles/icon_smile.gif) |
Ah ça
Ensuite Rman as tu utilisé OVHM (le seul intérêt de la release 2) pour créer ton site ?
EDIT : encore une fois j'ai mal lu ...
Il faut que tu recompiles Apache en incluant le support des vhosts :
va dans /usr/local/portage-ovh/net-www/apache-ovh
Edit l'ebuild correspondant à la version 2.0.59
Code: |
src_compile() {
cd ${WORKDIR}/"httpd-$PV"
./configure \
--prefix=/usr/local/apache \
--enable-suexec \
--with-suexec-caller=nobody \
--with-suexec-userdir=www \
--with-suexec-docroot=/home \
--with-suexec-logfile=/usr/local/apache/logs/cgi.log \
--with-suexec-uidmin=89 \
--with-suexec-gidmin=89 \
--with-suexec-safepath=/usr/local/bin:/usr/bin:/bin \
--enable-rewrite \
--enable-so \
--enable-cgi \
--enable-info \
--enable-ssl \
--enable-vhost-alias \ <== rajoute cette ligne
--enable-deflate \
--enable-headers \
--enable-expires \
|| die "Configure failed"
emake || die "Compile failed"
|
Rajoute la ligne pointée par une flèche, fais un ebuild apache-ovh-2.0.59.ebuild digest et recompile le paquet apache-ovh. Vas-y doucement avec la phase etc-update ![Rolling Eyes :roll:](images/smiles/icon_rolleyes.gif) _________________ --
L'idéal de nouveauté semble avoir remplacé l'idéal de progrès. C'est bien triste.
----
Unix philosophy: "Do one thing and do it well."
systemd: "Try to do everything and do it wrong." |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Rman n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Apr 2007 Posts: 6
|
Posted: Mon Apr 30, 2007 9:15 am Post subject: |
|
|
Oui j'ai créé mon site avec OVHM.
Comme je débute, c'est pour ça que j'ai prit une release et j'avoue que recompiler apache me fait peur tout de même, sa ne risque pas d'entrer en conflit avec Webmin et autre?
EDIT : j'ai rajouté les lignes correspondante je tape quoi maintenant ?
ebuild apache-ovh-2.0.59.ebuild et après tu parle de recompiler le paquet apache-ovh, je connais vraiement pas grand chose en Gentoo, si quelqu'un pouvait m'éclairer. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
boozo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/83658268945e337605eec8.gif)
Joined: 01 Jul 2004 Posts: 3193
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Rman n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Apr 2007 Posts: 6
|
Posted: Mon Apr 30, 2007 11:55 am Post subject: |
|
|
La compilation à fonctionné mais quand je tape etc-update j'obtient :
Code: | Scanning Configuration files...
Exiting: Nothing left to do; exiting. :)
|
ensuite pour accéder à monsite c plus www.site.com mais www.site.com/~site C'est binard. Si je tape www.site.com je tombe directement sur la page par défaut. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Rman n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Apr 2007 Posts: 6
|
Posted: Mon Apr 30, 2007 2:10 pm Post subject: |
|
|
Bon après quelque modification du httpd.conf, tout fonctionne.
Un grand merci
Donc il fallait bien recompiler apache ce qui provoque un léger dérèglement au niveau de httpd.conf. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Oupsman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 Jul 2004 Posts: 1042
|
Posted: Mon Apr 30, 2007 4:00 pm Post subject: |
|
|
Une petite modification du titre alors ? ![Wink :wink:](images/smiles/icon_wink.gif) _________________ --
L'idéal de nouveauté semble avoir remplacé l'idéal de progrès. C'est bien triste.
----
Unix philosophy: "Do one thing and do it well."
systemd: "Try to do everything and do it wrong." |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|