vhosts
Posted by: Bento (66.79.171.---)
Date: June 16, 2008 10:26AM

Hi all,

I've set everything up fine so far.

Now I've added these lines to the apache vhost file:

<VirtualHost *:80>
ServerAdmin webmaster@potholestudios.com
DocumentRoot "D:/wamp/www/potholestudios.com"
ServerName potholestudios.com
ServerAlias www.potholestudios.com
ErrorLog "logs/potholestudios.com-error.log"
CustomLog "logs/potholestudios.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@potholestudios.com
DocumentRoot "D:/wamp/www/files.potholestudios.com"
ServerName files.potholestudios.com
ErrorLog "logs/files.potholestudios.com-error.log"
CustomLog "logs/files.potholestudios.com-access.log" common
</VirtualHost>


Now the problem is when i visit potholestudios.com, www.potholestudios.com and files.potholestudios.com all I get is the root of D:/wamp/www/ which in there is a blank file called index.html.

Any help appreciated.

Options: ReplyQuote
Re: vhosts
Posted by: toivo (---.nsw.bigpond.net.au)
Date: June 16, 2008 02:23PM

Hi,

You should add the <directory> entry to each of the virtual hosts, for example:

<Directory "D:/wamp/www/potholestudios.com">
AllowOverride None
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: vhosts
Posted by: Bento (66.79.171.---)
Date: June 16, 2008 02:39PM

Do you mean like this?

<VirtualHost *:80>
ServerAdmin webmaster@potholestudios.com
DocumentRoot "D:/wamp/www/potholestudios.com"
ServerName potholestudios.com
ServerAlias www.potholestudios.com
ErrorLog "logs/potholestudios.com-error.log"
CustomLog "logs/potholestudios.com-access.log" common
<Directory "D:/wamp/www/potholestudios.com">
AllowOverride None
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

because I have done this and it is still not working.

Thanks for your time.

Options: ReplyQuote
Re: vhosts
Posted by: toivo (---.nsw.bigpond.net.au)
Date: June 16, 2008 02:45PM

Have you removed # in front of this line in httpd.conf:

Include conf/extra/httpd-vhosts.conf

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: vhosts
Posted by: Bento (66.79.171.---)
Date: June 16, 2008 02:47PM

aha, I found the problem, the vhosts line in the mian httpd.conf file was #'ed out.

Stupid me.

Thanks anyway toivo.

Options: ReplyQuote
Re: vhosts
Posted by: toivo (---.nsw.bigpond.net.au)
Date: June 16, 2008 02:49PM

Great minds think alike...

:-)

toivo
Sydney, Australia

Options: ReplyQuote
Re: vhosts
Posted by: Bento (66.79.171.---)
Date: June 16, 2008 02:55PM

Yeah smiling smiley

Anyway while we're here to login to the admin panel on my site you need to enter a security code, problem is with wamp it's not showing :/

admin page:

www.potholestudios.com/admin.php

www.potholestudios.com/phpinfo.php

Any ideas?


Also, rewrite doesn't seem to be working, I had to edit out the section in my .htaccess file to redirect people from potholestudios.com to www.potholestudios.com

Thanks.



Edited 1 time(s). Last edit at 06/16/2008 02:59PM by Bento.

Options: ReplyQuote
Re: vhosts
Posted by: toivo (---.nsw.bigpond.net.au)
Date: June 16, 2008 03:08PM

No idea, you have to look at the PHP code, I am afraid. It may be because of a function that is not available in the Windows implementation of PHP. Do not post the code it here if you want to keep it secure. PM is OK.

Another word of advice: you should organise the admin functions into a subfolder where you add an .htaccess file and restrict the access to IP subnets you trust.

I can see that you are not a big IE fan :-)

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: vhosts
Posted by: Bento (---.no-dns-yet.enta.net)
Date: June 16, 2008 03:12PM

toivo Wrote:
-------------------------------------------------------
> No idea, you have to look at the PHP code, I am
> afraid. It may be because of a function that is
> not available in the Windows implementation of
> PHP. Do not post the code it here if you want to
> keep it secure. PM is OK.
>
> Another word of advice: you should organise the
> admin functions into a subfolder where you add an
> .htaccess file and restrict the access to IP
> subnets you trust.
>
> I can see that you are not a big IE fan :-)
>
> Regards,

PM Sent smiling smiley

Thanks for the idea for the admin area smiling smiley.

The I.E thing was done by the other admin lol.



Edited 1 time(s). Last edit at 06/16/2008 03:15PM by Bento.

Options: ReplyQuote
Re: vhosts
Posted by: yfastud (Moderator)
Date: June 16, 2008 03:13PM

Please, check this instruction to see if you're missing any step

[guides.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: vhosts
Posted by: Bento (---.no-dns-yet.enta.net)
Date: June 16, 2008 03:22PM

Ok well the code is working now, I had a fiddle with PHP extensions and probably found the right one.

Just one more problem now is the site wont send email, is there an extension for that?

Options: ReplyQuote
Re: vhosts
Posted by: toivo (---.nsw.bigpond.net.au)
Date: June 16, 2008 03:34PM

No extensions, but the usual suspects like the mail() function in PHP are available. The default SMTP server address is in php.ini that Apache uses in c:\wamp\bin\apache\apache2.2.8\bin\php.ini. If your CLI scripts send emails, edit c:\wamp\bin\php\php5.2.5\php.ini.

If you need to install PEAR::mail, check out the instructions from my personal website at
[toivo.talikka.com].

Regards,

toivo
Sydney, Australia

Options: ReplyQuote


Sorry, only registered users may post in this forum.