localhost/xampp no more accessible

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

localhost/xampp no more accessible

Postby ggiorelli » 30. November 2011 19:35

hello

i changed the documentroot and directory to point to a new folder. but i lost my xampp.

is there a way to fix this issue without putting xampp into the documentroot? I believe if i do so, it will be a security breach.

thank you
ggiorelli
 
Posts: 1
Joined: 30. November 2011 19:31
Operating System: Windows XP

Re: localhost/xampp no more accessible

Postby JonB » 30. November 2011 20:58

Basically - yes there is a way -

You can set up a 'vhost' - its a virtual server. XAMPP has a sample setup in \xampp\apache\conf\extra\httpd-vhosts.conf

http://httpd.apache.org/docs/2.0/vhosts/examples.html

http://apptools.com/phptools/virtualhost.php

There 'may' be some hardwired items in the /xampp folder, I do not know that answer. so It might have to reside under the Document Root - maybe someone else can answer that (or maybe I can test this evening where I won't break things)

BUT - you could have several local 'domains' to work with using vhosts and your 'hosts' file.

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: localhost/xampp no more accessible

Postby Sharley » 01. December 2011 00:01

You could use an Alias directive if at this point in time you don't need a VirtualHost setup.

In the C:\xampp\apache\conf\extra\httpd-xampp.conf file find the sections below and add the red section like so, I am assuming you have installed XAMPP in the default C:\xampp location (change this path to suit your own installation location)
<IfModule alias_module>
Alias /security "C:/xampp/security/htdocs/"
<Directory "C:/xampp/security/htdocs">
<IfModule php5_module>
<Files "xamppsecurity.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
</Directory>

Alias /xampp "C:/xampp/htdocs/xampp/"
<Directory "C:/xampp/htdocs/xampp">
</Directory>


Alias /licenses "C:/xampp/licenses/"
<Directory "C:/xampp/licenses">
Options +Indexes
<IfModule autoindex_color_module>
DirectoryIndexTextColor "#000000"
DirectoryIndexBGColor "#f8e8a0"
DirectoryIndexLinkColor "#bb3902"
DirectoryIndexVLinkColor "#bb3902"
DirectoryIndexALinkColor "#bb3902"
</IfModule>
</Directory>
Save the file and then restart Apache

Now try http://localhost/xampp and you should see the orange XAMPP Welcome (Admin) page.


More information about the Alias Directive can be found here:
http://httpd.apache.org/docs/2.2/mod/mo ... html#alias

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: localhost/xampp no more accessible

Postby JonB » 01. December 2011 03:50

An Alias directive is a good idea and should also work, and I'm surprised it did not occur to me. Maybe I needed more coffee before I posted :mrgreen:

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 97 guests