This instructable is to show you how to install Apache, PHP, MySQL on localhost.
Also how to set it up so that you have some cool network features, such as being able to load the root directory using the computer's name (http://desktop/index.php), being able to edit files on other computers, and access different computers through different ports while using a domain or IP.

For people who are just getting into web development, this will help you a bundle. I've been using this setup (or similar) for at least 2 years. You can code sites on localhost, and once it works perfectly, upload it onto a host.

Unfortunately, I am forced to do this on a Vista machine, since my laptop with XP is already set up, and this computer gives me ACPI errors when I install XP.

Step 1: Configure Your Network Card

In order for you to be able to use this on computers outside your home network, (The internet) you will need this step.
This only work if you have a router.
Go into your control panel, Network and Sharing center. Where it says Connection, look to the far right. There should be a View Status button. Click on that.
Note down your IP address, (IPv4, if you see IPv6 too) your subnet mask, default gateway, and DNS servers.
Now press close, and in the "Local Area Connection Status" window, click on Properties.
Click on TCP/IPv4, then click on properties. Check off "Use the following IP address", and enter in all the information you just noted down.
Optionally, you can use and for your DNS servers. I find that they update really fast compared to other DNS servers.
This ensures your PC keeps the same local IP, and the DHCP doesn't re-assign you an IP whenever you restart.

<p>I like to design a website but i dont know how to do.. so i tried using wordpress my website: <a href="http://www.millionaire-matchdating.com/millionaire-match" rel="nofollow">MillionaireMatch</a></p>
I like phppgadmin for managing postresql databases also. Alittle talk about certificates or a link would have been nice.
I have a question that would probably be quite easy for you to answer...<br /> <br /> I just want to be able to access my database using any of the computer on my local network, yet I&nbsp;seem to be having some difficulty in doing that. Currently, I&nbsp;have the server and database working perfectly on my computer, and am easily able to access it through <a href="http://localhost" rel="nofollow">http://localhost</a>. How can I&nbsp;allow local machines to access it as well?
Depending on the router, you can put your hostnames and ipaddresses in your router to let it act like a local dns server. Worst case scenario, you can put the hostnames and ipaddresses (s/b static) in your hosts file. Thatis what I do till I have time to set up something fancier.
&nbsp;Local machines should be able to see it through your local ip address, or your computer name. &nbsp;To check your local IP, just do an ipconfig.&nbsp;
cvxdes, iahev run into a dilema. I have been running a forum site from my home server, and I have that site running because of the apache built in to xampp. I was wondering how I would set up my server so that it can host the site and being able to send emails because when you try to send emails through the forums, it won't send because I don't have a mail server. also, I'm hoping i can keep all this on one computer/server becuase that is all I have room for. I tried using the Mercury mail server built into xampp, but it then messed up my apache server, and was showing some weird mercury mail page instead of my site.
You need to configure PHP with a mail server. It's in php.ini, somewhere.
Depends on what platform you have and tt is not just a php file mod. I do not know about mswindows, but on linux postfix is the usual candidate. Add dovecot for imap/pop3 support, and then squirrelmail if you want a web interface.
yeah, i have messed with php.ini already, and even tried using my isp's mail server, but it still doesn't work. and the fact that xampp only provides a fake sendmail doesn't help either, lol.
Mentioning how to set password access with .htaccess and the command to ask spiders not to index your site would be a nice additive to this instructable. Well done.
Hey... really nice Instructable. Thank you. Just a thought. The speed of a Name Server update is influenced only by the TTL setting on your domain name set up In theory. Another thought is firewalls. You guys may have to make a hole in your Firewall, if you are running one. My other thought, is JSAS. I use a product called JSAS Joomla Stand Alone Server. It is a 2 click install with no configuration necessary. This allows you to use Joomla which is a wonderful web environment - a database driven web portal. It provided both versions of Joomla within the app. It has PHP, MySql Apache and Joomla built in, but you dont need to go under the bonnet. It can also run any web site or web based app you want. I love it and use it at work. (I'm a Webby) The info you provided will help people a lot. Well Done !
A very good instructable! = )<br/>Just one question:<br/><br/><strong>http://your external ip : yourport</strong><br/><strong>http://your domain : yourport</strong><br/><br/>means that I could go to my friend's house or my school and view my website from there off my home server right?<br/><br/>If so, then congratulations, you found the solution I've been looking for when it comes to hosting my own websites for free.<br/>You can see that I made an attempt at this a few months ago when I wrote an article on the Apache softare. Just type in <strong>Apache</strong> in the search bar of Instructables if you feel like taking a look at what I wrote. Unfortunately, I could only see my website on my local network at home, not anywhere else.<br/><br/>Once again, thank you for providing us with valuable information! = )<br/><br/><em>Scriptking1</em><br/>
Yes. You'll have to port forward port 80, and you'll need need to get an account at a free DNS site. Or if you can remember your ip.. then you can just go to that. If you want any help with it, send me a message. I can help you out on msn or aim.
Ok, thank you!<br/>That is so cool! = )<br/>Finally I can host my own website.<br/>Thanks. I'll PM you my Hotmail account if I need help. Although I'll have to wait until June when I get my computer privilages back from my parents.<br/><br/><em>Scriptking1</em><br/>
Cool. I was going to do one of these for a series of PHP tutorials that I have planned. With XAMPP you don't need to configure your card and router unless you want to access it from other computers or the Internet.

About This Instructable




More by cvxdes:How to install a web development enviornment on localhost How to hide a key, effectivley Pneumatic Snowball Cannon 
Add instructable to: