Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17854

Struggling with virtual hosts

$
0
0

Hi,

I'm getting an Apache server configured, but so far I don't seem to quite understand virtual hosts (and it seems the way Linux handles hosts in general).

1) When I add a line to /etc/hosts to resolve my custom domain (ex: "127.0.0.1 test.local"), why doesn't it resolve when I try a command like "host test.local"? Do I need to restart some service after changing /etc/hosts?

2) Is there anything wrong with this Apache configuration:

<VirtualHost *:80> ServerName test.local DocumentRoot /var/www/test </VirtualHost> 

When I try to access http://test.local using my browser (Firefox) it just stays there "Connecting..." which again reinforce my doubts about my changes to /etc/hosts not taking effect. Any ideas?

submitted by DrunkenBeard
[link][10 comments]

Viewing all articles
Browse latest Browse all 17854

Trending Articles