Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , , ,

Sponsored Links



Problems with vhosts

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 19-01-2010
Member
 
Join Date: Jan 2010
Posts: 57
Problems with vhosts

I have big problems with my vhosts. Situation: I have a RPS server, and a dozen domains configured to point to this server.

I managed to bind, and then try to manage Apache, and I use virtual hosts to manage sub-domains for example.

Only a few weeks, without my knowledge why, nothing goes, and I think it shows that I have misconfigured something (and perhaps misunderstood, at the base).

That translates into the fact that some of my domains are not accessible, sometimes only the subdomains are but "http://domain.com" does not work ...

When I say "not working", it says on Firefox:
Quote:
Not Found

The requested URL / was not found on this server.
I have a folder "assets" which simply replaces "sites-enabled". This is just for practical reasons I stated in apache2.conf I wanted to be it who is taken into account.

In "active" I have a file for each domain. Each file is roughly made the same way:

Code:
<VirtualHost my.fine.address.ip:80>
        ServerName domain1.com
        Redirect permanent / http://www.domain1.com
</VirtualHost>
<VirtualHost my.fine.address.ip:80>
        ServerAlias *.domain1.com
        VirtualDocumentRoot /home/mynickname/domain1/%-3+/
</VirtualHost>
They told me on IRC (# httpd on Freenode) not without benefit to pass to talk to me like a mongolian (I love IRC), I have had anywhere my.fine.address.ip:80 (with My IP instead, you can imagine).

So I put everywhere. They also told me "for each VirtualHost, you need a DIFFERENT ServerAlias". Until proven otherwise, it is good.

They also told me that I should not have two VirtualHost one after the other as it is in every file ... possible.

Then, in my conf.d 000-default contains:

Code:
NameVirtualHost my.fine.address.ip:80

<VirtualHost my.fine.address.ip:80>
        ServerName localhost
        DocumentRoot "/var/www/"
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>
They asked me on IRC the result of apache2ctl-S.

Code:
VirtualHost configuration:
my.fine.address.ip:80       is a NameVirtualHost
         default server localhost (/etc/apache2/conf.d/000-default:3)
         port 80 namevhost localhost (/etc/apache2/conf.d/000-default:3)
         port 80 namevhost pineapple.com (/etc/apache2/actifs/pineapple:1)
         port 80 namevhost apple.com (/etc/apache2/actifs/pineapple:5)
         port 80 namevhost kiwi.us (/etc/apache2/actifs/kiwi:1)
         port 80 namevhost apple.com (/etc/apache2/actifs/kiwi:5)
         port 80 namevhost apple.com (/etc/apache2/actifs/apple:1)
         port 80 namevhost apple.com (/etc/apache2/actifs/apple:5)
         port 80 namevhost banana.com (/etc/apache2/actifs/banana:1)
         port 80 namevhost apple.com (/etc/apache2/actifs/banana:5)
         port 80 namevhost orange.cat (/etc/apache2/actifs/orange:1)
         port 80 namevhost apple.com (/etc/apache2/actifs/orange:5)
         port 80 namevhost mango.us (/etc/apache2/actifs/mango:1)
         port 80 namevhost apple.com (/etc/apache2/actifs/mango:5)
         port 80 namevhost pear.com (/etc/apache2/actifs/pear:1)
         port 80 namevhost apple.com (/etc/apache2/actifs/pear:5)
         port 80 namevhost cherry.com (/etc/apache2/actifs/cherry:5)
         port 80 namevhost apple.com (/etc/apache2/actifs/cherry:9)
Syntax OK
I have replaced my domain names with the names of fruit. As you see, it's just a mess. Finally I think. In short, how to fix it and do things properly?
Reply With Quote
  #2  
Old 19-01-2010
Member
 
Join Date: Nov 2008
Posts: 1,187
Re: Problems with vhosts

There really was no noticeable change on the server a few weeks ago? A new site? A DNS conf?

There is indeed surprising things:
Quote:
port 80 namevhost apple.com (/etc/apache2/actifs/banana:5)
port 80 namevhost apple.com (/etc/apache2/actifs/kiwi:5)
port 80 namevhost apple.com (/etc/apache2/actifs/apple:1)
port 80 namevhost apple.com (/etc/apache2/actifs/apple:5)
port 80 namevhost apple.com (/etc/apache2/actifs/banana:5)
We see everywhere apple.com

The behavior is random (or appears random)? It's always have the same plant or area that it varies?

Have you tried to put across: 80 instead of my.fine.address.ip:80?

It is possible that you send the entire contents of your active directory? Can you also give the contents of /etc/hosts for your server?
Reply With Quote
  #3  
Old 19-01-2010
Member
 
Join Date: Jan 2010
Posts: 57
Re: Problems with vhosts

Yes I added a domain, but it is not the first time I do, so I understand. It does not vary over time. Some areas are working completely, others partially. Before, I put: 80 everywhere, it was the same thing. I will send the contents of my folder "assets" by PM.
Reply With Quote
  #4  
Old 19-01-2010
Member
 
Join Date: Nov 2008
Posts: 1,187
Re: Problems with vhosts

In the Apache access logs, try to add the hostname (% (Host) i) in the tracks to see what hostname is actually received and interpreted by Apache when you have your 404 not found.
Reply With Quote
  #5  
Old 19-01-2010
Member
 
Join Date: Jan 2010
Posts: 57
Re: Problems with vhosts

Listen to log I, after access to biganon.com and lypt.us (access that does not work):

Quote:
biganon.com:80 92.104.196.183 - - [11/Jan/2010:23:03:42 +0200] "GET / HTTP/1.1" 404 256 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.3) Gecko/20090913 Shiretoko/3.5.3"
lypt.us:80 92.104.196.183 - - [11/Jan/2010:23:04:43 +0200] "GET / HTTP/1.1" 301 266 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.3) Gecko/20090913 Shiretoko/3.5.3"
I have not managed to change the format (though I specified LogFormat)
Reply With Quote
  #6  
Old 19-01-2010
Member
 
Join Date: Nov 2008
Posts: 1,187
Re: Problems with vhosts

Just to test, if you change the VH biganon.com as follows, what is happening?

Code:
<VirtualHost 87.98.146.113:80>
    ServerName biganon.com
    DocumentRoot /home/biganon/biganon/www/
</VirtualHost>
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Problems with vhosts"
Thread Thread Starter Forum Replies Last Post
ACL problems under Mac OS X Dewei Windows Software 5 13-08-2010 05:47 PM
PIO DMA problems Carol.fire Motherboard Processor & RAM 6 02-07-2010 12:29 PM
Problems with Mac Pro Oswaldo Hardware Peripherals 4 23-01-2010 10:43 AM
Windows Movie Maker - Timeline Problems, and AutoMovie Problems Viebo Windows XP Support 1 08-03-2009 06:35 AM
2 different vista problems. Memory dump crash and startup repair cannot fix problems Hiera Vista Help 4 28-06-2008 02:06 PM


All times are GMT +5.5. The time now is 04:04 AM.