FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-23-2011, 05:37 AM
Amrit Pal Pathak
 
Default Virtual hosting on ubuntu desktop

I am using ubuntu desktop (10.04).I have installed Lamp and other packages.I want virtual hosting at my system(name based) so that i can access different pages with same I.P address (localhost).Can anybody here who have dont it ever?

What changes should i made to http.conf file of apache2?

Thanks

amritpalpathak.blogspot.com

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-23-2011, 07:59 AM
"Jordon Bedwell"
 
Default Virtual hosting on ubuntu desktop

On Fri, July 22, 2011 10:37 pm, Amrit Pal Pathak wrote:
> I am using ubuntu desktop (10.04).I have installed Lamp and other
> packages. I want virtual hosting at my system(name based) so that
> i can access different pages with same I.P address (localhost).
> Can anybody here who have dont it ever? What changes should i made
> to http.conf file of apache2?

sudo -i
mkdir -p /srv/www/{domain.tld,default.domain}
cp -R /var/www/* /srv/www/{domain.tld,default.domain}
chown -R www:www /srv/www
rm -rf /var/www
vim /etc/apache2/sites-available/default
After you open it add "ServerName *"
After you open it edit "DocumentRoot" to "/srv/www/default.domain"
cp /etc/apache2/sites-available/default
/etc/apache2/sites-available/domain.tld
mv /etc/apache2/sites-available/default
/etc/apache2/sites-available/default.domain
vim /etc/apache2/sites-available/domain.tld
After you open it edit "ServerName" to "domain.tld"
After you open it edit "DocumentRoot" to "/srv/www/domain.tld"
vim /etc/hosts
After you open it add at the end of the 127.0.0.1 line "domain.tld"

Now you get to restart and test it:
service apache2 restart
service apache2 status

Some of this is not needed, like the moving and removing of /var/www, I
just have problems with /var/www because it is, a, well, direct violation
of FHS that Apache refuses to fix and Debian also refuses to fix. While
for very good reasons they won't remove it and change it to a more
appropriate directory, it's still annoying to me that there is that FHS
violation in Apache right off the bat.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 09:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org