Re: apache virtual directories / VirtualHost overlap
zbigniew szalbot wrote: Hello, Schiz0 pisze: On Jan 9, 2008 11:00 AM, zbigniew szalbot [EMAIL PROTECTED] wrote: Hello, Can you help me solve what probably is a very simple problem with virtual directories. I need to define two different virtual hosts for the same IP. So I defined: NameVirtualHost 83.19.156.210 VirtualHost 83.19.156.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/data/ ServerName lists.lc-words.com ErrorLog /var/log/httpd-error.log CustomLog /var/log/httpd-access.log common /VirtualHost VirtualHost 83.19.156.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/data/blog/ ServerName blog.lc-words.com ErrorLog /var/log/httpd-error.log CustomLog /var/log/httpd-access.log common /VirtualHost However, when I restart apache, I get: [Wed Jan 09 16:59:34 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence What do I need to change to make it right? Many thanks! Zbigniew Szalbot ___ Try adding the port to the IP addresses. For example: NameVirtualHost 83.19.156.210:80 VirtualHost 83.19.156.210:80 And also for the other VirtualHost block too. I actually solved it by following advice from: http://httpd.apache.org/docs/2.0/vhosts/name-based.html However, the problem is that the blog.lc-words.com does not serve the site I want it to serve. But instead serves the default site which is lists.lc-words.com Thanks! ZS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] if it were me, id move the blog directory up on, to /usr/local/www/blog. otherwise, what apache is telling you, is that if the configuration even worked, that someone could view the content of blog as if it were a directory of the top level's site. along with moving the directory up one (and editing the virtual host's line to reflect the move), add the folder as a 'Directory statement' in your configuration: Directory /usr/local/www/blog AllowOverride None Order Allow,deny Allow from all /Directory hth, -- Jonathan Horne http://dfwlpiki.dfwlp.org freebsd08 [EMAIL PROTECTED] dfwlp.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: apache virtual directories / VirtualHost overlap
On Jan 9, 2008 11:00 AM, zbigniew szalbot [EMAIL PROTECTED] wrote: Hello, Can you help me solve what probably is a very simple problem with virtual directories. I need to define two different virtual hosts for the same IP. So I defined: NameVirtualHost 83.19.156.210 VirtualHost 83.19.156.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/data/ ServerName lists.lc-words.com ErrorLog /var/log/httpd-error.log CustomLog /var/log/httpd-access.log common /VirtualHost VirtualHost 83.19.156.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/data/blog/ ServerName blog.lc-words.com ErrorLog /var/log/httpd-error.log CustomLog /var/log/httpd-access.log common /VirtualHost However, when I restart apache, I get: [Wed Jan 09 16:59:34 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence What do I need to change to make it right? Many thanks! Zbigniew Szalbot ___ Try adding the port to the IP addresses. For example: NameVirtualHost 83.19.156.210:80 VirtualHost 83.19.156.210:80 And also for the other VirtualHost block too. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: apache virtual directories / VirtualHost overlap
Jonathan Horne wrote: zbigniew szalbot wrote: So I defined: NameVirtualHost 83.19.156.210 VirtualHost 83.19.156.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/data/ ServerName lists.lc-words.com ErrorLog /var/log/httpd-error.log CustomLog /var/log/httpd-access.log common /VirtualHost VirtualHost 83.19.156.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/data/blog/ ServerName blog.lc-words.com ErrorLog /var/log/httpd-error.log CustomLog /var/log/httpd-access.log common /VirtualHost also, try this setting up a vhost for the actual host, then 'child' vhosts for the different sites that you want to host. an example: # Virtual Hosts NameVirtualHost *:80 # VH for actualhost.example.com VirtualHost *:80 ServerName actualhost.example.com UserDir disable DocumentRoot /usr/local/www/apache22/data/ ErrorLog /var/log/httpd/error.log CustomLog /var/log/httpd/actualhost.example.com_log combined /VirtualHost # VH for blog VirtualHost *:80 ServerName blog.example.com UserDir disable DocumentRoot /usr/local/www/blog ErrorLog /var/log/httpd/error.log CustomLog /var/log/httpd/blog.example.com_log combined /VirtualHost # VH for lists VirtualHost *:80 ServerName lists.example.com ServerAlias lists.example.com DocumentRoot /usr/local/www/lists ErrorLog /var/log/httpd/error.log CustomLog /var/log/httpd/lists.example.com_log combined /VirtualHost i believe the specifying ServerName is critically important to sucessfully wrangling all your vhosts into the proper DocumentRoot(s). hth, -- Jonathan Horne http://www.dfwlp.org [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: apache virtual directories / VirtualHost overlap
Hello, Schiz0 pisze: On Jan 9, 2008 11:00 AM, zbigniew szalbot [EMAIL PROTECTED] wrote: Hello, Can you help me solve what probably is a very simple problem with virtual directories. I need to define two different virtual hosts for the same IP. So I defined: NameVirtualHost 83.19.156.210 VirtualHost 83.19.156.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/data/ ServerName lists.lc-words.com ErrorLog /var/log/httpd-error.log CustomLog /var/log/httpd-access.log common /VirtualHost VirtualHost 83.19.156.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/data/blog/ ServerName blog.lc-words.com ErrorLog /var/log/httpd-error.log CustomLog /var/log/httpd-access.log common /VirtualHost However, when I restart apache, I get: [Wed Jan 09 16:59:34 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence What do I need to change to make it right? Many thanks! Zbigniew Szalbot ___ Try adding the port to the IP addresses. For example: NameVirtualHost 83.19.156.210:80 VirtualHost 83.19.156.210:80 And also for the other VirtualHost block too. I actually solved it by following advice from: http://httpd.apache.org/docs/2.0/vhosts/name-based.html However, the problem is that the blog.lc-words.com does not serve the site I want it to serve. But instead serves the default site which is lists.lc-words.com Thanks! ZS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: apache virtual directories / VirtualHost overlap
Hello all, Jonathan Horne pisze: zbigniew szalbot wrote: Hello, Schiz0 pisze: On Jan 9, 2008 11:00 AM, zbigniew szalbot [EMAIL PROTECTED] wrote: Hello, Can you help me solve what probably is a very simple problem with virtual directories. I need to define two different virtual hosts for the same IP. So I defined: NameVirtualHost 83.19.156.210 VirtualHost 83.19.156.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/data/ ServerName lists.lc-words.com ErrorLog /var/log/httpd-error.log CustomLog /var/log/httpd-access.log common /VirtualHost VirtualHost 83.19.156.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/data/blog/ ServerName blog.lc-words.com ErrorLog /var/log/httpd-error.log CustomLog /var/log/httpd-access.log common /VirtualHost However, when I restart apache, I get: [Wed Jan 09 16:59:34 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence What do I need to change to make it right? Many thanks! Zbigniew Szalbot ___ Try adding the port to the IP addresses. For example: NameVirtualHost 83.19.156.210:80 VirtualHost 83.19.156.210:80 And also for the other VirtualHost block too. I actually solved it by following advice from: http://httpd.apache.org/docs/2.0/vhosts/name-based.html However, the problem is that the blog.lc-words.com does not serve the site I want it to serve. But instead serves the default site which is lists.lc-words.com Thanks! ZS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] if it were me, id move the blog directory up on, to /usr/local/www/blog. otherwise, what apache is telling you, is that if the configuration even worked, that someone could view the content of blog as if it were a directory of the top level's site. along with moving the directory up one (and editing the virtual host's line to reflect the move), add the folder as a 'Directory statement' in your configuration: Directory /usr/local/www/blog AllowOverride None Order Allow,deny Allow from all /Directory Jonathan - thank you for a very helpful advice! As for the site not being served, it was an internal problem of a .htaccess redirection. All solved. Thank you everyone who contributed! Zbigniew Szalbot hth, ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]