Je viens à vous après de multiples recherches pour résoudre mon problème.
Pour commencer voilà les informations sur ma raspberry pi :
- Distrib version: Raspbian jessie 8.0
- Server version: Apache/2.4.10 (Raspbian)
- Terminal par SHH
Ce que je cherche à faire :
Je cherche à avoir 3 sites distinct sur ma raspberry pi, stoqués comme suis :
Code : Tout sélectionner
/home/http/[site]/public_html
-(site0) IPduserveur
-(site1) IPduserveur/site1
-(site2) IPduserveur/site2
J'ai donc utilisé les VirtualHosts d'apache2.
J'arrive à faire fonctionner mon site0 et il est accéssible à l'adresse "IPduserveur"
Mais impossible d'accéder au site 1 et 2.
Voilà mon fichier apache2.conf
Code : Tout sélectionner
/etc/apache2/apache2.conf
Code : Tout sélectionner
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
#### Ma modif
<Directory /home/http/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
#### Fin modif
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
Code : Tout sélectionner
/etc/apache2/sites-available/webclient.conf
Code : Tout sélectionner
<VirtualHost *:80>
ServerName webclient
ServerAlias *
ServerAdmin adresse@localhost
DocumentRoot /home/http/webclient/public_html
ErrorLog ${APACHE_LOG_DIR}/error-webclient.log
CustomLog ${APACHE_LOG_DIR}/access-webclient.log combined
<Directory /home/http/webclient/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Code : Tout sélectionner
/etc/apache2/sites-available/webtech.conf
Code : Tout sélectionner
<VirtualHost *:80>
ServerName webtech
ServerAlias */webtech
ServerAdmin adresse@localhost
DocumentRoot /home/http/webtech/public_html
ErrorLog ${APACHE_LOG_DIR}/error-webtech.log
CustomLog ${APACHE_LOG_DIR}/access-webtech.log combined
<Directory /home/http/webtech/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Voilà mon fichier /etc/Hosts :
Code : Tout sélectionner
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.O.1.1 webtech
127.0.1.1 webclient
127.0.1.1 betty
Code : Tout sélectionner
|--home
|--http
| |--webclient
| | |--public_html
| |--webtech
| | |--public_html
Merci par avance pour le temps que vous m'octroirez.
Cd, bigbrownies