HOW TO: Access Xampp websites from another Hard Drive

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

HOW TO: Access Xampp websites from another Hard Drive

Postby kinraw » 12. August 2011 02:02

I am running Windows 7 32-bit on the E: hard drive, I want to browse my websites on C:/xampp/etc.

Here's what's going on....I have two hard drives.

My C: [500GB] drive contains a working version of XP, of which i am leaving intact. All my old files and docs will reside here including my websites. I store my website files and run IIS and xampp (for php sites) on this hard drive.

Now, i installed Windows 7 onto another hard drive (E: [80GB]). When i boot up I boot to the hard drive with Windows 7. The old C: drive basically becomes a a drive of which i use as my file system, due to its large capicity.

I have IIS running on window 7 and can access and browse to my websites on the old C: drive. This works fine.


Do i need to install xampp to my windows 7 drive? What will be the url of the xampp websites: (localhost:someNumberHere/testsite/index.php)?

Has anyone done this?
Posts: 1
Joined: 12. August 2011 01:37

Re: HOW TO: Access Xampp websites from another Hard Drive

Postby Sharley » 12. August 2011 03:00

kinraw wrote:What will be the url of the xampp websites: (localhost:someNumberHere/testsite/index.php)?
You would need to edit using a text only editor the C:\xampp\apache\conf\httpd.conf file and change these settings{code]Listen 80[/code]to another port number, for example
Code: Select all
Listen 800
your choice.

Also change this using the number you decide above
Code: Select all
ServerName localhost:80

Save the file.

Next open in your text editor C:\xampp\apache\conf\extra\httpd-ssl.conf and change all instances of port 443 to port 4433.
Save the file then restart Apache and you are now set to use the following URIs
http://locahost:800/testsite/index.php if the testsite folder is in the C:\xampp\htdocs which is the default DocumentRoot.

You can also go to https//localhost:4433/testsite/index.php

If you don't envisage using SSL then simply find and comment out this section in the httpd.conf file so it looks like this
Code: Select all
# Secure (SSL/TLS) connections
# Include "conf/extra/httpd-ssl.conf"
That way you would not need to edit the httpd-ssl.conf file.
Again save the file and restart Apache after edit configuration files and do remember to make a backup copy before editing.

If you have an issue restarting Apache then read the C:\xampp\apache\logs\error.log file for clues.

These changes should now allow you to access both IIS and Apache without there being a port clash.
User avatar
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

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 78 guests