apache config and seperate vhost help..
yeah, hey, my question is, i set up all my virtual hosts to goto seperate domains, but the second virtual host, the index file, is getting redirected to the first virtual host.. is there anyway around this? (i hope that makes sense)
also, i need some help on having separate log files for each domain, just on how to do it, thanks. |
check your DocumentRoot entries.
|
my DocumentRoots' are all correct..
|
are all sites set up as virtual host? even your 'main site' should be set up as a vhost. if not, all vhosts will point to the index file of the main site.
|
Re: apache config and seperate vhost help..
Quote:
Quote:
Code:
<VirtualHost www.servername.net> Jamie... |
<VirtualHost IP.Address.here>
ServerAdmin webmaster@xxxxx DocumentRoot /httproot/web1 ServerName www.firstdomain.tld # ErrorLog logs/host.some_domain.com-error.log # CustomLog logs/host.some_domain.com-access.log common </VirtualHost> <VirtualHost IP.Address.here> ServerAdmin webmaster@xxxxx DocumentRoot /httproot/web2 ServerName www.seconddomain.tld # ErrorLog logs/host.some_domain.com-error.log # CustomLog logs/host.some_domain.com-access.log common </VirtualHost> the logs are directed to /var/log/apache/ , but i want them to be directed to the folder where each domain is, like /web/domain1/logs (for domain one) and /web/domain2/logs (for domain two) i hope that makes sense.. hehe |
To get the logs to /web/domain1/logs you simply need to have ErrorLog /web/domain1/logs/some_access-log and ensure that whatever user httpd runs as has the ability to write to this directory.
I've also only played with named virtualhosts not IP addressed based virtual hosts. In which case I'm using Code:
NameVirtualHost www.mainserver.net HTH Jamie... |
i had changed the IP address' to the actual virtual host, it restarts fine, but it's not reading seperate log files for the domains, and the second web domain is reading the index file for the first domain.. heh
*had to edit a word out, since it made no sense* heh. |
ah, nevermind, it's working all good now, i guess i had to wait for my name server to update or something.. hehe, thanks a lot guys.. helped me a lot.
|
I've had to wait for DNS records to propagate in the past. Glad its working.
Jamie... |
All times are GMT -5. The time now is 06:10 PM. |