Public feed
#893939
cemoi@serv:~$ su
Password:
serv:/home/cemoi# cd /
serv:/# nano /etc/hosts
serv:/# cd /etc/apache2/conf.d
serv:/etc/apache2/conf.d# ls -a
. .. apache2-doc charset
serv:/etc/apache2/conf.d# nano virtual-host.conf
serv:/etc/apache2/conf.d# cd /
serv:/# cd /etc/apache2/sites-available
serv:/etc/apache2/sites-available# ls -a
. .. default
serv:/etc/apache2/sites-available# nano virtual1.conf
serv:/etc/apache2/sites-available# cd /
serv:/# cd /etc/hosts
bash: cd: /etc/hosts: N'est pas un répertoire
serv:/# nano /etc/hosts
serv:/# a2ensite cemoidav.serveftp.net
This site does not exist!
serv:/# a2ensite virtual1.conf
Site virtual1.conf installed; run /etc/init.d/apache2 reload to enable.
serv:/# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)... waiting Syntax error on line 1 of /etc/apache2/conf.d/virtual-host.conf:
Invalid command 'echo', perhaps misspelled or defined by a module not included in the server configuration
failed!
serv:/# nano /etc/hosts
serv:/# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...Syntax error on line 1 of /etc/apache2/conf.d/virtual-host.conf:
Invalid command 'echo', perhaps misspelled or defined by a module not included in the server configuration
failed!
serv:/# nano /etc/apache2/conf.d/virtual-host.conf
serv:/# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...Warning: DocumentRoot [/home/cemoi/www/cemoidav.serveftp.net] does not exist
httpd (no pid file) not running
Warning: DocumentRoot [/home/cemoi/www/cemoidav.serveftp.net] does not exist
.
serv:/# mkdir home/cemoi/www
serv:/# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...Warning: DocumentRoot [/home/cemoi/www/cemoidav.serveftp.net] does not exist
waiting Warning: DocumentRoot [/home/cemoi/www/cemoidav.serveftp.net] does not exist
.
serv:/# nano /etc/apache2/sites-available
serv:/# cd /etc/apache2/sites-available
serv:/etc/apache2/sites-available# ls
default virtual1.conf
serv:/etc/apache2/sites-available# nano default
serv:/etc/apache2/sites-available# nano virtual1.conf
serv:/etc/apache2/sites-available# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)... waiting apache2: Syntax error on line 668 of /etc/apache2/apache2.conf: Syntax error on line 46 of /etc/apache2/sites-enabled/virtual1.conf: Expected </Directory> but saw </VirtualHost>
failed!
serv:/etc/apache2/sites-available# nano virtual1.conf
serv:/etc/apache2/sites-available# nano /etc/apache2/conf.d/virtual-host.conf
serv:/etc/apache2/sites-available# cd /
serv:/# more /etc/hosts
127.0.0.1 localhost
127.0.1.1 serv
#192.168.0.11 cemoidav.serveftp.net
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
serv:/# nano /etc/hosts
serv:/# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...apache2: Syntax error on line 668 of /etc/apache2/apache2.conf: Syntax error on line 46 of /etc/apache2/sites-enabled/virtual1.conf: Expected </Directory> but saw </VirtualHost>
failed!
serv:/# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...apache2: Syntax error on line 668 of /etc/apache2/apache2.conf: Syntax error on line 46 of /etc/apache2/sites-enabled/virtual1.conf: Expected </Directory> but saw </VirtualHost>
failed!
serv:/# more etc/hosts
127.0.0.1 localhost
127.0.1.1 serv
192.168.0.11 cemoidav.serveftp.net
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
serv:/# more /etc/apache2/conf.d/virtual-host.conf
echo "NameVirtualHost cemoidav.serveftp.net" | sudo tee /etc/apache2/conf.d/virtual-host.conf
serv:/# more etc/apache2/sites-available/virtual1.conf
NameVirtualHost cemoidav.serveftp.net
<VirtualHost cemoidav.serveftp.net>
ServerAdmin webmaster@localhost
DocumentRoot /home/cemoi/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/cemoi/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/virtual1_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>
serv:/#
serv:/#
serv:/#
serv:/#
serv:/#
serv:/#
serv:/# more etc/apache2/sites-/virtual1.conf
sites-available/ sites-enabled/
serv:/# more etc/apache2/sites-enabled/virtual1.conf
NameVirtualHost cemoidav.serveftp.net
<VirtualHost cemoidav.serveftp.net>
ServerAdmin webmaster@localhost
DocumentRoot /home/cemoi/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/cemoi/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/virtual1_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>
serv:/#