localhost access as http not https

Problems with the Windows version of XAMPP, questions, comments, and anything related.

localhost access as http not https

Postby vespera » 07. September 2009 14:04

I was using wamp for some time, and now I've decided to try Xampp. I've installed ver 1.7.1 (it has PHP 5.2.9 - Joomla doesn't work for now with PHP 5.3). Installation went well - I set the password for phpMyAdmin, and created a few virtual hosts. They are all listed in my hosts file
Code: Select all
127.0.0.1       localhost
127.0.0.1       opatija21
127.0.0.1       proeduca
127.0.0.1       rona
127.0.0.1       test

I also set the parameters in httpd-vhosts.conf (actually copied the settings that I had in Wamp, and adjusted the paths to Xampp)
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "E:/xampp/htdocs"
    ErrorLog "error.log"
    CustomLog "access.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerName www.opatija21.hr
    ServerAlias opatija21  opatija21.hr
    DocumentRoot "E:/xampp/htdocs/opatija21"
    ErrorLog "logs/opatija21-error.log"
    CustomLog "logs/opatija21-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerName test
    DocumentRoot "E:/xampp/htdocs/test"
    ErrorLog "logs/test-error.log"
    CustomLog "logs/test-access.log" common
</VirtualHost>
and so on for each virtual host stated in the hosts file.
Every virtual host (domain) has its own folder, and its own database with password.
Actually it all works well - I've started Apache and MySQL (I'm still not too familiar with Mercury, but I'll get to it...), Installed Joomla on one of the virtual hosts, made sure that the include httpd-vhosts.conf is enabled...
And there is the problem:
I can access all sites by typing https://localhost/xampp/ or https://localhost/test/ or whatever the name of the virtual host is, but if I try open it as http://localhost/xampp/ or http://localhost/test/ all I get is Access forbidden Error 403.
If I click on Apache Admin in Xampp control panel (it points to http://localhost/) I also get a 403 error, but the MySQL Admin that points to http://localhost/phpmyadmin/ opens correctly the phpMyAdmin start page to log in with the password I've set earlier. I have set both Apache and MySQL to run as services (manual start) and I start them through Xampp control panel.
I don't remember that I've set something during the installation... I was used to access the sites through HTTP in wamp - why should Xampp be different? What should I change so I can access my sites through HTTP?
Thank's
User avatar
vespera
 
Posts: 4
Joined: 07. September 2009 11:59

Re: localhost access as http not https

Postby Wiedmann » 07. September 2009 14:15

I set the password for phpMyAdmin, and created a few virtual hosts.
...
If I click on Apache Admin in Xampp control panel (it points to http://localhost/) I also get a 403 error, but the MySQL Admin that points to http://localhost/phpmyadmin/ opens correctly the phpMyAdmin start page to log in with the password I've set earlier.

Was this working right after the installation (before you have changed anything in the config files yourself)?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: localhost access as http not https

Postby vespera » 07. September 2009 14:21

I'm actually not sure now - I dont think it was - could be that this happened after I set the password for mySQL root user, in http://localhost/security/xamppsecurity.php. (I didn't set the password for xampp directory protection there).
User avatar
vespera
 
Posts: 4
Joined: 07. September 2009 11:59

Re: localhost access as http not https

Postby Wiedmann » 07. September 2009 14:22

could be that this happened after I set the password for mySQL root user,

No. MySQL is a separate server and have nothing to do with the webserver.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: localhost access as http not https

Postby vespera » 07. September 2009 14:50

Forgot to mention, on Xampp status page the HTTPS (SSL) is "Activated" - but I don't remember activating it?
How do I deactivate it?
User avatar
vespera
 
Posts: 4
Joined: 07. September 2009 11:59

Re: localhost access as http not https

Postby Wiedmann » 07. September 2009 15:42

on Xampp status page the HTTPS (SSL) is "Activated"

That's not related to your problem (can't access with HTTP).

How do I deactivate it?

Don't load the ssl_module in "httpd.conf".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: localhost access as http not https

Postby vespera » 07. September 2009 16:18

Just found the problem - it was my httpd-vhosts.conf.
All the virtual hosts were corectlly defined, except for the localhost itself, instead of setting the root for
ServerName localhost
to
DocumentRoot "E:/xampp/htdocs"
I have set it to just "E:/xampp".
Once I added that "htdocs" at the end of path, all was well - now I can open pages with http://localhost/...
User avatar
vespera
 
Posts: 4
Joined: 07. September 2009 11:59


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 234 guests