Zmieniałem ustawienia vhosta jednak nie działało to jak należy.
Przywróciłem sobie oryginalny plik vhosta bo wcześniej zrobiłem jego kopie.
Niestety po tej operacji apache nie wstaje.
Błędy:
root@aaaaa:~# /etc/init.d/apache2 restart
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
failed!
root@aaaaa:~# systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: failed (Result: exit-code) since pon 2015-10-19 14:18:26 CEST; 27s ago
Process: 10641 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 2515 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)
Process: 10940 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
paź 19 14:18:26 aaaaa.ovh.net apache2[10940]: The apache2 configtest failed. ... (warning).
paź 19 14:18:26 aaaaa.ovh.net apache2[10940]: Output of config test was:
paź 19 14:18:26 aaaaa.ovh.net apache2[10940]: [Mon Oct 19 14:18:26.798915 2015] [alias:warn] [pid 10949] AH00671: The Alias directive in /etc/apache2/conf-enabled/squirre...lier Alias.
paź 19 14:18:26 aaaaa.ovh.net apache2[10940]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:62
paź 19 14:18:26 aaaaa.ovh.net apache2[10940]: AH00543: apache2: bad user name web2
paź 19 14:18:26 aaaaa.ovh.net apache2[10940]: Action 'configtest' failed.
paź 19 14:18:26 aaaaa.ovh.net apache2[10940]: The Apache error log may have more information.
paź 19 14:18:26 aaaaa.ovh.net systemd[1]: apache2.service: control process exited, code=exited status=1
paź 19 14:18:26 aaaaa.ovh.net systemd[1]: Failed to start LSB: Apache2 web server.
paź 19 14:18:26 aaaaa.ovh.net systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
W podanym pliku nic nie modyfikowałem.
Udało mi się postawić apache. Usunąłem pliki vhosta dla domeny którą modyfikowałem z site-avaible oraz site-enabled usunąłem katalog i dodałem ponownie przez pasnel i wstał
Ale nie rozumiem, że jak namieszałem w konfiguracji vhosta a potem przywróciłem oryginał to już nie chciało zadziałać.
Wrzucam plik: squirrelmail.conf bo może jednak jest w nim coś nie tak.
Alias /squirrelmail /usr/share/squirrelmail
<Directory /usr/share/squirrelmail>
Options FollowSymLinks
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_admin_flag allow_url_fopen Off
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/squirrelmail/tmp
php_admin_value open_basedir /usr/share/squirrelmail:/etc/squirrelmail:/var/lib/squirrelmail:/etc/hostname:/etc/mailname
php_flag register_globals off
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
# access to configtest is limited by default to prevent information leak
<Files configtest.php>
order deny,allow
deny from all
allow from 127.0.0.1
</Files>
</Directory>
# users will prefer a simple URL like http://webmail.example.com
#<VirtualHost 1.2.3.4>
# DocumentRoot /usr/share/squirrelmail
# ServerName webmail.example.com
#</VirtualHost>
# redirect to https when available (thanks omen@descolada.dartmouth.edu)
#
# Note: There are multiple ways to do this, and which one is suitable for
# your site's configuration depends. Consult the apache documentation if
# you're unsure, as this example might not work everywhere.
#
#<IfModule mod_rewrite.c>
# <IfModule mod_ssl.c>
# <Location /squirrelmail>
# RewriteEngine on
# RewriteCond %{HTTPS} !^on$ [NC]
# RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]
# </Location>
# </IfModule>
#</IfModule>
Alias /squirrelmail /usr/share/squirrelmail
Alias /webmail /usr/share/squirrelmail
<VirtualHost *:80>
DocumentRoot /usr/share/squirrelmail
ServerName webmail.aaaaaa.ovh.net
</VirtualHost>
root@aaaaaa:~# apachectl configtest
[Mon Oct 19 21:25:12.650186 2015] [alias:warn] [pid 7369] AH00671: The Alias directive in /etc/apache2/conf-enabled/squirrelmail.conf at line 49 will probably never match because it overlaps an earlier Alias.
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:62
Syntax OK
root@aaaaaa:~#
1. Warn - Masz zdublowane aliasy (Alias /squirrelmail /usr/share/squirrelmail)
2. NameVirtualHost - jak podaje komunikat opcja będzie usunięta w następnej wersji
3. Sekcja virtualhost. Zerknij sobie na przykład który Ci podałem oraz: