Mi sono piantato. Ho cercato di abilitare i Virtual Hosts e...TRAMMM!
Allora, partiamo dall'inizio. Ho modificato httpd.conf decommentando la riga
Codice: Seleziona tutto
# Virtual hosts
Include /etc/httpd/extra/httpd-vhosts.conf
Ho modificato httpd-vhosts.conf così:
Codice: Seleziona tutto
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [MIA_EMAIL]
DocumentRoot "/var/www/htdocs"
ServerName localhost
ServerAlias localhost
ErrorLog "/var/log/httpd/localhost-error_log"
# CustomLog "/var/log/httpd/localhost-access_log common"
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [MIA_EMAIL]
DocumentRoot "/home/[MIO_UTENTE]/[MIO_SITO]"
ServerName [MIO_SITO]
ServerAlias [MIO_SITO]
ErrorLog "/var/log/httpd/[MIO_SITO]-error_log"
# CustomLog "/var/log/httpd/[MIO_SITO]-access_log common"
</VirtualHost>
Prima di tutto, se decommento la riga
Codice: Seleziona tutto
# CustomLog "/var/log/httpd/localhost-access_log common"
e do un
mi esce questo errore
Codice: Seleziona tutto
Syntax error on line 39 of /etc/httpd/extra/httpd-vhosts.conf:
CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" clause (see docs)
Se invece lascio la riga commentata, Apache parte senza problemi, ma riesco solo a raggiungere localhost. Se vado su MIO_SITO il browser mi dice
Codice: Seleziona tutto
Forbidden
You don't have permission to access / on this server.
Dove sbaglio?
Ah, ovviamente ho impostato il file /etc/hosts assegnando anche MIO_SITO a 127.0.0.1 (localhost era già assegnato).
A voi la parola.