drifter Posted December 15, 2006 Share Posted December 15, 2006 OK - sorry if my questions is dumb... I normally do not leave the php section...If I have a virtual host setup... do all the properties outside the virtual host tags get inherited by the virtual host?like if I have this set up[code]User scottGroup scottDocumentRoot /home/scott/public_html<VirtualHost 72.29.82.92>ServerAlias *.yelmdirectrealestate.comServerAdmin [email protected]BytesLog domlogs/yelmdirectrealestate.com-bytes_logServerName yelmdirectrealestate.comCustomLog /usr/local/apache/domlogs/yelmdirectrealestate.com combined</VirtualHost><VirtualHost 72.29.82.92>ServerAlias *.olympiadirectrealestate.comServerAdmin [email protected]BytesLog domlogs/olympiadirectrealestate.com-bytes_logServerName olympiadirectrealestate.comCustomLog /usr/local/apache/domlogs/olympiadirectrealestate.com combined</VirtualHost>[/code]in this case, would both of there virtual hosts inherit the same documentroot, user, but still have their seperate CustomLog?Thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/30721-virtual-host/ Share on other sites More sharing options...
steviewdr Posted December 15, 2006 Share Posted December 15, 2006 Nope - not im my opinion.There will have to be a seperate DocumentRoot for each VirtualHost.As for User and Group - Im not quite sure what you are trying to achieve here! Apache wont be SU'ing into scott:scott!As for CustomLog - I think thats also required. If you omit a Custom Log in a Virtual Host - it will put it into the main access | error.log file.Also - the best thing about apache - is that you can test it yourself to see if it works!!.-steve Quote Link to comment https://forums.phpfreaks.com/topic/30721-virtual-host/#findComment-141646 Share on other sites More sharing options...
dbrimlow Posted December 15, 2006 Share Posted December 15, 2006 They will have a seperate docroot that you should define in a DocumentRoot in the vhost directive. Since the user and group is scott ... "/home/scott/public_html" is the DocumentRoot; so just add a sub-folder for each site (also, I always use The NameVirtualHost directive since vhosts use the same IP anyway - unless this is just a local linux webserver, then use the IP):[code]NameVirtualHost 72.29.82.92:*<VirtualHost yelmdirectrealestate.com www.yelmdirectrealestate.com>ServerName yelmdirectrealestate.comServerAdmin [email protected]DocumentRoot /home/scott/public_html/yelmdirectrealestate.comBytesLog domlogs/yelmdirectrealestate.com-bytes_logCustomLog /usr/local/apache/domlogs/yelmdirectrealestate.com combined</VirtualHost><VirtualHost olympiadirectrealestate.com www.olympiadirectrealestate.com>ServerName olympiadirectrealestate.comServerAdmin [email protected]DocumentRoot /home/scott/public_html/olympiadirectrealestate.comBytesLog domlogs/olympiadirectrealestate.com-bytes_logCustomLog /usr/local/apache/domlogs/olympiadirectrealestate.com combined</VirtualHost>[/code]But, if this is an online webserver (not a local developer server) beware the perception by search engines of spamming. If these are two different real estate domains using the same IP AND DocumentRoot, search engines could very well consider this an attempt at spamming.Even when they have their own root, sometimes the fact that they have the same IP can "potentiallY' be considered spam (although they are not as strict if they have a different root). Quote Link to comment https://forums.phpfreaks.com/topic/30721-virtual-host/#findComment-141907 Share on other sites More sharing options...
drifter Posted December 15, 2006 Author Share Posted December 15, 2006 Would a search engine even know they use the same documentroot? it is not in the headers that i can see.http://www.seoegghead.com/tools/view-http-headers.php?action=get_header_action&info%5Burl%5D=http%3A%2F%2Frealtybycheryl.comAs far as coming from the same IP, there is not much I can do about that. The content and design on all the pages are completely seperate. The IBLs are different. The keywords are different.... They really are seperate sites owned by seperate people.Search have to know that in any industry there are people that specialize in developing sites for that industry, so there will be lots of sites on the same IPs or the same IP blocks. Quote Link to comment https://forums.phpfreaks.com/topic/30721-virtual-host/#findComment-142063 Share on other sites More sharing options...
dbrimlow Posted December 19, 2006 Share Posted December 19, 2006 [quote]Search have to know that in any industry there are people that specialize in developing sites for that industry, so there will be lots of sites on the same IPs or the same IP blocks.[/quote]True. And like I said, they don't really enforce the same IP rule as spam anymore.BUT, if you have two websites, with 2 different domain names, that point to the same root, BUT are the same industry ... THAT may not get by the relaxed rule.[b]Each domain should have it's own root, seperate and apart from any other website root ... that's how vhosts work and why they were created.[/b] They allow you to specify a completely new root for a website within the Apache "www" folder.But, for "natural ranking" it still isn't the optimun SEO situation. Sure, if each vhost has different quality links to them, then that it always the bot's first consideration for natural ranking.[quote]Would a search engine even know they use the same documentroot? it is not in the headers that i can see.[/quote]Of course SE bots know the path of each domain they crawl ... otherwise how would they index it? SE bots are extremely smart, but even the dumbest bot can follow and index paths ... it is what they are created for. Quote Link to comment https://forums.phpfreaks.com/topic/30721-virtual-host/#findComment-144796 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.