![]() When you start XAMPP through the console, it will say starting Apache on port 80. That’s it! *** XAMP 1.7.3 changes – see bottom of post XAMPP reports the wrong values This changes the SSL (HTTPS) port to 442 (or again, your port of choice).Edit file C:\xampp\apache\conf\extra\nf.Again – if you chose another port, update witht that.You could also change to another port of choice, e.g. this tells Apache to listen to all IP addresses on port 81 (you probably don’t need the asterisk but I did.By altering two config files in apache you can easily over-ride this:įor the purpose of this article I’ll assume you installed XAMPP to the default location. By default, Apache also assumes these same settings (as does XAMPP). (This assumes you just installed XAMPP) Change the Port Defaultsīy default IIS uses ports 80 and 443 for HTTP and HTTPS access respectively ( list of ports and what they do here). Personally I went the Apache route and here’s how I did it (using XAMPP v1.7.1). There are two ways to solve this – either change IIS (the harder way) or change the Apache config (the easier way) – either way you’ll achieve the same thing. If you have IIS installed on your Windows environment and want to run XAMPP (the windows flavour of Apache, MySQL, Perl and PHP) then here’s an easy way for both applications to co-exist. * UPDATED FOR XAMPP 1.7.5 (November 2011) So I don’t think the permission issue was the cause of the fault with the virtual host.* This post gets 100’s of hits a week – if you’ve found this article helpful please leave a comment – thanks in advance!* However with the virtual host I didn’t get any forbidden error, it would just load the localhost virtual host instead of the other virtual host. After fixing permissions, I haven’t tried the virtual host solution though. This didn’t work at the beginning because of permissions issues and I got a forbidden error now I’ve fixed the permissions and this works. Yes to both: edited /etc/hosts (if I don’t, browser won’t find any virtual host at all and look for a “real” domain which doesn’t exist) and yes, the line mentioned by mark was already uncommented.Īnyway I solved it in another way, not at all the same but ok for me instead of creating a virtual host, I placed a symbolic link _inside_ htdocs to the other folder, so when I go to the localhost, I see the symbolic link and follow it. ![]() First go to C:\Windows\system32\drivers\etc and open hosts in a text editor, again Notepad or Notepad++ are the best. Now that you’ve done that there are just two steps left. If you don’t you won’t be able to access your standard localhost any more, at least that’s what happened to me. One more thing you need to do is enter another rule for your localhost. That’s why I use a unique domain name & a tld that (as far as I’m aware) is very uncommon, or doesn’t exist. Remember that if you use a real, existing domain name you will no longer be able to visit that site once you are finished. You just need to change the email (if you are using that), the root to the path to the folder you created earlier, and the server name & alias to the domain name you want to use. Inside the file there will be a lot of lines pre-ceeded by pounds/hashes (#). Notepad or Notepad++ are generally the best. Next open the file called nf in a text editor. The full path will look something like D:\xampp\apache\conf\extra. This is generally in the xampp folder along with your htdocs folder. Next you need to go to your apache folder. This will be where all your files go, as normal. This guide is for XAMPP since that is the local server I have, but I’m fairly confident it will work for most Apache based Windows local servers.įirst create a new folder for your new site/project inside your XAMPP’s htdocs folder. The main reason for using one is that it will help keep your sites organized & your URL’s will be nice and neat. Why would I need One?Ī virtual host can be helpful for setting up a new local projects. While they are extremely useful they can be incredibility difficult to set up if you aren’t used to working with apache. Virtual hosts allow you to set up websites on your localhost accessable using full domain names instead of via localhost/site. After reading be sure to check for newer procedures or updates to code. Please use caution when following older tutorials or using older code. ![]() This post was published back on Jand may be outdated.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |