Reputation: 225
I have tried the below code to point the domain name to specific directory into linux
NameVirtualHost *.80
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/html/example.com
</VirtualHost>
but the above code is not working.
Upvotes: 1
Views: 44
Reputation: 26
the above code is for apache2.2, so you just replace above code with
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin [email protected]
DocumentRoot "/var/www/html/example.com"
CustomLog "/var/www/html/example.com/access_log" combined
ErrorLog "/var/www/html/example.com/error_log"
</VirtualHost>
Upvotes: 0
Reputation: 151
Did you run a2ensite exemple.com.conf? Restart apache after that.
Upvotes: 1