Page 1 of 1

HOW TO: Access Xampp websites from another Hard Drive

PostPosted: 12. August 2011 02:02
by kinraw
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?

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

PostPosted: 12. August 2011 03:00
by Sharley
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.