Page 1 of 1

virtual hosts on xampp 7.0.3

PostPosted: 28. February 2016 10:28
by patratel
Hi,
I've upgraded my pc to windows 10 (clean install) and i've installed xampp 7.0.3, php is working, but virtual-hosts are not.
I've put in hosts file my site:
"127.0.0.1 localhost
127.0.0.1 cmtr"

I put also in httpd-vhosts.conf:

<Directory D:/sites>
Require all granted
</Directory>

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/sites/cmtr"
ServerName cmtr
</VirtualHost>

Can someone help me, what I've missed, or what I'm doing wrong?

Thanks,
patratel

Re: virtual hosts on xampp 7.0.3

PostPosted: 28. February 2016 10:47
by Nobbie
We need more information abou that.

What exactly is happening, what exactly do you enter in the browser, are you running the browser on the same PC as Xampp and please provide all error messages completely.

P.S.: Did you "un-uncomment" (i.e. remove the # in the beginning) the corresponding include for httpd-vhosts.conf in httpd.conf? It is NOT sufficient only to change httpd-vhosts.conf

Re: virtual hosts on xampp 7.0.3

PostPosted: 28. February 2016 11:13
by patratel
I am on same PC with xampp.
______________
When I enter in browser "//http://localhost/test.php", i get the phpinfo().
When I enter localhost/cmtr, I got Error 404:
"Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.3"
_____________
In httpd.conf, the vhosts where already un-commented:

# Virtual hosts
Include conf/extra/httpd-vhosts.conf
_____________
I remember that some time ago, I had to modify the grants from
"Order Deny,Allow
Allow from all"
to
"Require all granted"

Maybe is something like this, or I'm missing something:(
I've tried to put a printscreen with phpinfo and one with Error 404, but I don't know how to attach a file :)

Thanks

Re: virtual hosts on xampp 7.0.3

PostPosted: 28. February 2016 11:36
by Nobbie
patratel wrote:When I enter localhost/cmtr, I got Error 404:
"Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.3"


Yes of course, you have a wrong understanding of VirtualHosts. in order to call http://localhost/cmtr, you must create a folder "cmtr" in the htdocs folder c:/xampp/htdocs. But if you create a VirtualHost "cmtr" instead, you MUST NOT enter http://localhost/cmtr for this VirtualHost, instead you must enter http://cmtr only (without localhost).

Re: virtual hosts on xampp 7.0.3

PostPosted: 28. February 2016 12:07
by patratel
Yes, you got wright, but help me with an other problem:
I got a rss reader, and I got this message:
"MM_XSLTransform error.
The server could not perform the XSL transformation because an XSLT processor for PHP could not be found. Contact your server administrator and ask them to install an XSLT processor for PHP."
Doesn't php 7 got XSLT support, or what?
Better I must go back to xampp 5?
I un-commented extension=php_xsl.dll in php.ini

Re: virtual hosts on xampp 7.0.3

PostPosted: 28. February 2016 12:14
by Nobbie
I dont know anything about the PHP XSLT processor.

Re: virtual hosts on xampp 7.0.3

PostPosted: 28. February 2016 12:17
by patratel
OK, thanks for your help.

Re: virtual hosts on xampp 7.0.3

PostPosted: 28. February 2016 12:38
by patratel
It worked, I went back to xampp 5.6 and it works now.