vhosts don't work on localhost

Hi, I’m using OpenSuse 11.

I was just using Virtualmin to create a vhost named “local-magento”. Creation went fine, but I’d like to adress it my browser via localhost.local-magento.de.

It doesn’t work of course, but I don’t know why. I just want to use the new domain locally only, so it’s not a productive server.

Adressing the domain by for example works well.

So how can I adress the domain by name?

Hope you understand what my problem is …

Well, I’m a web-developer who formely developed under Windows XP and XAMPP.

What I’d like to have is the possibility to write “http://localhost.local-magento” into my browser and getting displayed the virtual host which is on my own computer.

There must be an option in Virtualmin. Or if not, where is the host-file located in OpenSuse 11? And do I need reboot?

Well, first off, remember that Virtualmin sets up the DNS for any Virtual Server it creates by default.

So whatever domains you’ve added should be accessible (exactly as you added them), so long as you’re using the DNS servers that Virtualmin is modifying.

Now, as Ronald said, if you’re trying to access them using a different or shorter name – such as “localhost.local-magento” – you can add that into /etc/hosts using the format he specified above.

And no, you wouldn’t need to reboot.

Have a good one,

all *nix distros use the hosts files located at /etc/hosts the follow what Ronald wrote to add the host(s)

Thank you very much, that did the trick!

you can try to edit your hosts file on the computer you use for browsing assuming you have the domain on a separate computer/server behind a router
assuming you browse on a winxp computer go to: [code:1]C:\WINDOWS\system32\drivers\etc[/code:1] and edit hosts file to add local-magento.de www.local-magento.de