LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-02-2013, 03:09 AM   #1
said76
Member
 
Registered: Aug 2011
Posts: 113

Rep: Reputation: Disabled
error when setting up multiple domains


Hi,

I am currently managing my own website e.g. www.example.com which is working fine and now would like to host another domain (e.g. www.someotherexample.com) on the same machine running Ubuntu Server 12.04 LTS.

I looked this up via google search and found that I need something like name-based virtual hosts.

So I made some changes in my apache2 httpd.conf by adding the following:
<snip>
...
Listen 80
...
<snip>

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "/usr/local/apache2/htdocs"
ServerName www.example.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "/usr/local/apache2/htdocs/myothersite/otherexample"
ServerName www.someotherexample.com
</VirtualHost>

Then, saved it and restart my apache2.

I got the following error message when trying to open the page http://www.someotherexample.com

Forbidden
You don't have permission to access / on this server

I have checked the file permission of the directory myothersite and they are apache:nogroup

I'm at a loss - I don't know what to do.

Any help would be greatly appreciated.

Thank you
 
Old 01-02-2013, 06:50 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

In ubuntu/debian the vhosts in apache are defined using files under /etc/apache2/sites-available/
Have a look here to see how it's bone

egards
 
Old 01-02-2013, 06:16 PM   #3
said76
Member
 
Registered: Aug 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
It works. thank you for the link, bathory.

Well done
 
Old 01-27-2013, 07:57 PM   #4
fsshl
Member
 
Registered: Jan 2002
Distribution: Ubuntu10.04
Posts: 49

Rep: Reputation: 1
in that link, there is a video
http://youtu.be/QaZBly7_0zo
in that video, Mr. wilson, say, test1.com, test2.com, for me it apparently not real domain name
so if I have realdomain1.com, realdomain2.com /* already registered these two domains and they point to my same public ip */
should I modify somewhere in linux file (like etc/host(...) and/or anything else)? to make my realdomain1.com and realdomain2.com be seen
in world wide web?
thanks any experts' advice/help in advance
 
  


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
Apache2 - having trouble setting up multiple domains under debian etch walterbyrd Linux - Software 3 01-08-2010 07:03 PM
Multiple emails accounts(with different from domains) on multiple domains on 1 server locoputo Linux - Server 0 04-12-2009 06:29 PM
Multiple domains in LDAP and 1 samba server for all domains, what to do? xnomad Linux - Server 1 11-14-2008 09:12 AM
Sub Domains & Multiple Domains (Apache) lugos Linux - Server 1 09-01-2006 10:22 PM
Bind configuration for multiple sub-domains on multiple sites JF1980 Linux - Networking 3 08-31-2006 01:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:46 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