LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-27-2010, 07:40 AM   #1
henri17
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Rep: Reputation: 0
I have a Problem with Apache which does not recognize the road my site


Hello,

I need just like that hand I installed my server on a base DEBIAN configured Apache which works with a site
I want to put to hand a second site and the I have the following problem.
Apache refuses to take into account the second site
I activate it with the command a2ensite my domaine.com and I have the following answer.
ERROR module mon domaine.com does not exist

I have the same road as for the first site which works her then I do not understand any more
This somebody can inform me would be nice

henri
 
Old 08-27-2010, 08:23 AM   #2
suprstar
Member
 
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142
Blog Entries: 2

Rep: Reputation: 22
Put virtualhosts in your httpd.conf file. If site1.yourdomain.com, site2.yourdomain.com, and site3.yourdomain.com all resolve to the same IP, then:

Code:
<VirtualHost *:80>
    ServerAdmin user1@yourdomain.com
    DocumentRoot /var/www/site1.yourdomain.com
    ServerName site1
    ErrorLog /var/log/httpd/error_site1
    CustomLog /var/log/httpd/access_site1 common
    ErrorDocument 404 /index.php
</VirtualHost>

<VirtualHost site2.yourdomain.com:80>
    ServerAdmin user2@yourdomain.com
    DocumentRoot /var/www/site2.yourdomain.com
    ServerName site2
    ErrorLog logs/error_site2
    CustomLog logs/access_site2 common
    ErrorDocument 404 /index.php
</VirtualHost>

<VirtualHost site3.yourdomain.com:80>
    ServerAdmin user3@yourdomain.com
    DocumentRoot /var/www/site3.yourdomain.com
    ServerName site3
    ErrorLog logs/error_site3
    CustomLog logs/access_site3 common
</VirtualHost>
will serve 3 distinct web sites based on the URL you're hitting. In this instance, site1.yourdomain.com is the default, and will be served for any hosts that aren't explicity defined in a virtualhost - ie if you have site4.yourdomain.com resolving to the server's IP.
 
Old 08-28-2010, 04:51 PM   #3
henri17
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Question I have a Problem with Apache which does not recognize the road my site

Thank you for your answer my the httpd.conf file is not any more used in apache2 under débian, the configuration file and in site available and defect the I installed my VirtualHost as you the presented, the problem and what Apache recognize that the first site and does not want to take into account the second site

As a In principle is needed active Apache in the console with the command: a2ensite my domaine.com
And posts me the following message:
ERROR mon domaine.com does not exist
Voila I hope to have been clearer.
henri
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Apache site redirects using what rule? foo.site.com -> www.site.com/foo LaughingBoy Linux - Server 2 04-16-2009 10:51 PM
Apache 2: second site on a second port problem aclarke Linux - Server 4 11-11-2008 09:38 AM
Apache 2.2 won't recognize virtual hosts gregmcavoy Linux - Server 3 01-17-2007 07:44 PM
apache not able to recognize php files phamtranquocvie Linux - Newbie 2 10-06-2004 12:32 PM
linux don't recognize my apache modem droplsh Linux - Hardware 0 03-02-2004 03:29 PM


All times are GMT -5. The time now is 07:02 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration