LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-15-2012, 10:31 PM   #16
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282

From http://httpd.apache.org/docs/2.0/vhosts/name-based.html :

Code:
NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/domain
</VirtualHost>

<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>
I'm not sure how Ubuntu works from this perspective; I use slackware servers. Maybe http://www.ubuntugeek.com/howto-crea...in-apache.html can be of help for you.

PS Don't forget to restart apache after changes in its configuration.
 
Old 07-15-2012, 10:42 PM   #17
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
How do you access your new site? http://pedro or http://localhost/pedro?

You might have to setup an entry in /etc/hosts that links pedro to 127.0.0.1 like below. The first line already exists, the second one (in italic red) should be added.
Code:
	127.0.0.1       localhost
	127.0.0.1       pedro
This allows the domain name pedro to be resolved to 127.0.0.1 by the webbrowser (else it will look somewhere on the web). Next you should be able to access it with http://pedro in the browser.

Last edited by Wim Sturkenboom; 07-15-2012 at 10:43 PM.
 
Old 07-15-2012, 10:47 PM   #18
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Hey! Brilliant!!

I already had this in hosts:

127.0.0.1 localhost
127.0.1.1 pedro-bedro

and apache said it was on 127.0.1.1 so I entered pedro-bedro, and bam!

Thanks for that! Now to see if the php script works!
 
Old 07-16-2012, 02:16 AM   #19
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Great. Please mark your thread as solved using the thread tools just above the first post on this page.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php cannot invoke msmtp gmail_cs Linux - Newbie 6 03-10-2011 07:41 PM
How to re-invoke dhcpd after changes were made to dhcpd.conf file. Azazwa Linux - Newbie 3 03-30-2009 04:44 AM
PHP webpage issue Dillius Linux - General 1 07-11-2006 05:07 PM
how to invoke Mozilla webpage in full screen when it is run taoweijia Programming 5 02-21-2004 04:45 PM
making a webpage server and home network server on the same computer ferretmanus Linux - Networking 1 09-11-2003 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration