PDA

View Full Version : [ubuntu] From localhost to example.com In Apache ?



saidbakr
February 25th, 2010, 02:03 PM
Hello
In some web applications related tutorials I noticed that the introducer use something like www.example.com to access the local apache server on his computer.

I wonder, how could he able to do that?

In addition I need to know, does it possible to access my local Apache web server on my Ubuntu computer from multiple addresses beside localhost, for examle:
myproject.com
theblog.net
etc

and each domain has its own document root.

Kakers
February 25th, 2010, 02:36 PM
I imagine he is probably using Virtual hosts in apache http://httpd.apache.org/docs/1.3/vhosts/name-based.html

example:
<VirtualHost 127.0.0.1>
DocumentRoot /www/example
ServerName www.example.com
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot /www/testing
ServerName www.testing.com
</VirtualHost>

Don't know too much about this myself, but have fun!

Kakers
February 25th, 2010, 02:48 PM
Here is a good example:
http://www.debian-administration.org/articles/412

saidbakr
February 26th, 2010, 12:40 AM
Here is a good example:
http://www.debian-administration.org/articles/412

In the tutorial you regarded something about creating symbolic links in some folders. Does it correct to use right mouse click then choose make link then copy the link file to the targeted directory?