![]() ![]() If you have any other questions regarding to this topic, feel free to ask in the comments below. If you XAMPP freezes when you want to restart the Apache, make sure that you are not using any HTTP:// or / on the end of the domain you wish to create a directory for. Setting up the MySQL Database In this article, we will go ahead and install XAMPP so we can use the localhost on both Windows and Mac. Download and install WordPress on your local computer Step 3. After you restarted the Apache, you should be able to access your new subdomain. Step 1: Download and Install XAMPP on Your Local Computer Step 2. If you are done with this and you are 100% sure you did everything right, restart your apache using the control panel of XAMPP (stop/start). Note: Windows 7 or Windows 8 doesn’t allow you to edit that file, to edit that file first copy it to other location say Desktop then edit it in your favourite editor and then paste (replace) edited file in etc folder. Create a backup of the hosts file then open it with your favorite text editor and add the following lines at the bottom: This can be found in C:/Windows/System32/drivers/etc. If you are done with this, you need to register your subdomain, in the Window’s hosts file. ServerAlias ErrorLog 'logs/ -error.log'ĬustomLog 'logs/ -access.log' combined ServerAdmin #DocumentRoot 'C:/xampp/htdocs/ ' The final result would look something like the following: Change the * to sub.localhost and on each line where it says dummy-host.localhost to. #CustomLog 'logs/' combinedĭuplicate it and remove the # from before each line, then we are ready to create the subdomain, in our case it will be sub.localhost of course you can make your whatever you would like to. #DocumentRoot 'C:/xampp/htdocs/dummy-host.localhost' Open up the nf with your favorite text editor and look for the following: To create the subdomain for you localhost you need to edit a XAMPP configuration file named nf this file is located in C:/xampp/apache/conf/extra (this might be different for you depending where you installed XAMPP). The folder’s name can be just the subdomain name (ex: the folder would be sub) or you can use the whole domain name for the folder name (ex: the folder would be Creating the Subdomain Go to C:/xampp/htdocs (this might be different for you depending where you installed XAMPP). Firstly you want to create the root directory of the new subdomain. Creating a Root Directory Folder for the Subdomin But what if you want to have multiple websites on your local server? You could simply create new folders and open them as but that’s just boring! How about creating a subdomain? Something like now that looks like something, doesn’t it. In the previous article, we’ve been talking about how to set up XAMPP on your local PC and how to install WordPress on it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |