Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtual Hosting 2

Status
Not open for further replies.

brettr1234

Technical User
Jun 2, 2002
42
CA
Ok, I was using apache2, and i couldn't get virtual hosting to work. Eventually after fiddiling with pretty much every setting i changed UseCanoncialname to on and it worked. But Php is not working correctly and i dont know how to fix it. So i installed the debian package. It works fine and php is working, but virtual hosting is not. I don't want to spend weeks again, does anyone know what could be causing this?

These are my virtual host settings.

NameVirtualHost 65.27.115.198

<VirtualHost 65.27.115.198>
ServerAdmin support@fjrconsulting.net
DocumentRoot /var/ServerName fjrconsulting.net
ErrorLog /var/log/apache/TransferLog /var/log/apache/</VirtualHost>

<VirtualHost 65.27.115.198>
ServerAdmin support@fjrconsulting.net
DocumentRoot /var/ServerName ErrorLog /var/log/apache/TransferLog /var/log/apache/</VirtualHost>

<VirtualHost 65.27.115.198>
ServerAdmin fjr@fjrconsulting.net
DocumentRoot /var/ServerName sowhatonline.com
ErrorLog /var/log/apache/TransferLog /var/log/apache/</VirtualHost>

<VirtualHost 65.27.115.198>
ServerAdmin fjr@fjrconsulting.net
DocumentRoot /var/ServerName ErrorLog /var/log/apache/TransferLog /var/log/apache/</VirtualHost>
 
Ok Wullie I will try that. In regards to RhythmAce's comment i will try and commenting out those but i cant put a * it will not work for apache1.3.9-14.

Thanks guys i will try it tomorow going to go to sleep
 
Hey wullie, it's about time for me to hit the sack too but I like that idea. Think I'm gonna try it on my server. :)
 
I thought you httpd.conf looked a little funky for version 2.
 
Hey wullie and RhythmAce and everyone else who helped me Thanks so much that new way of virtual hosting works great. Is there a webpage where i can read some documentation on adding other commands etc?

Thanks again
Brett
 
Hi mate,

I was waiting for someone to ask that!! LOL

I have never really tested this so I am not sure. The reason that what you have doesn't work is that Apache is not using the Vhost_Alias to parse the %0.

If you take a look at the rest of them, they are as follows:

VirtualDocumentRoot /VirtualScriptAlias /
Notice the &quot;VIRTUAL&quot;, that is what tells Vhost_Alias to parse those detials. Virtual however doesn't work with logs so you would have to go about this another way.

If I get time later I will test this but I can't guarantee anything as I am really busy.

Hope this helps Wullie

 
Heh Ok thanks dude if you find a way let me know you have been very helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top