Search This Blog

Benjamin Philip. Theme images by Roofoo. Powered by Blogger.

Comments

Translate

Recent

How to setup a XAMPP Server on your PC

SHARE:



Setting up a local test server on your computer relatively easy. As well as providing the WAMP stack (Windows, Apache, MySQL and PHP) it includes both PHP versions 4.x and 5.x. It also includes PHPMyAdmin which is very useful for dealing with your MySQL databases.
The following instructions describe XAMPP configuration in some detail. A quickstart guide is also available.
(NOTE: XAMPP is only intended for use as a local test server which is available on your own computer. It has been created for ease-of-use, but not for production level security. If you want to tinker with security here is a guide about making XAMPP secure.)

Installation

The installation of XAMPP is very straightforward. Rather than repeat the installation instructions here, just follow the instruction on the XAMPP site. Instructions for setting up a XAMPP server with Drupal can be found on this page.
Once you have downloaded and installed the package you may like to do some further configuration...

Configuring XAMPP

Creating virtual hosts

If you do not want to keep your files in the xampp/htdocs directory and type in a long URL for every page load, you can create virtual hosts for each of your sites instead. For example, you may like to keep all your sites in your My Documents folder for easy backup. Or you could create a root directory on your hard drive such as C:/sites/example/ which will make using shell commands easier. Wherever you choose to store your sites, you can always easily move them at a later date.
With XAMPP you set up virtual hosts in the following file:
/xampp/apache/conf/extra/httpd-vhost.conf
Open up that document in your text editor and append the following information to the bottom:
NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
  DocumentRoot "C:/xampp/htdocs/"
  ServerName localhost
</VirtualHost>
The above only needs to be added once and you don't need to change any details to the above.
The next step, however, needs to be carried out for each site. Copy the code below and add it to the bottom of the file.
<VirtualHost example.local>
  DocumentRoot "C:/path/to/your/site"
  ServerName example.local

  CustomLog "C:/path/to/your/site/logs/example.local.access.log" combined
  ErrorLog "C:/path/to/your/site/logs/example.local.error.log"

  <Directory "C:/path/to/your/site">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>
You will need to make some alterations for your personal setup. Check that you have used only forward slashes.
Where it says example.local put the URL you would like to type into your browser to find your site. You can call this what you like, but make sure it relates to the site you are creating and is not a real URL that you may like to access on the Internet otherwise you will get a namespace clash. Using the production site's URL but replacing .com or whatever with .local works well.
Where it says "C:/path/to/your/site"add the directory where your site is going to be stored on your local drive. Note that you should NOT include a slash on the end of the path. You can also set up a place to keep error and access logs for these sites. You will need to create the directory structure for these manually, but not the individual files (i.e. create the directory structure C:/path/to/your/site/logs but Apache will create the example.local.error.log file for you).
If you are using a portable installation of XAMPP, you may like to try adding this instead:
<VirtualHost 127.0.0.1:80>
  DocumentRoot "/path/to/your/site"
  ServerName example.local
...
...
</VirtualHost>
Finally you must include the domain names in your Windows host file. This file can be found at:
C:/WINDOWS/system32/drivers/etc/hosts
open this file in your text editor and add:
127.0.0.1 example.local
You can repeat this procedure for as many sites as you wish.
When you are done, restart Apache.

COMMENTS

Name

android,6,Arduino,4,Blogs,10,C Programming,26,Computer,18,Electronic,12,HTML,22,Mobile,13,NEWS W,2,PHP,8,Programming,1,Project,9,Tutorial,7,
ltr
item
GetYarn: How to setup a XAMPP Server on your PC
How to setup a XAMPP Server on your PC
How to setup a XAMPP Server on your PC
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_LEIxxTe5FvxJwIkXpJw61lDYJ67q_WskRdbRxjkzaL0LjsulufdrfazW_m5KFgOSLTY7mHjP-HRKZBafGHJpr7Ye3bSqFVBAkEax3ZBOMtw5zLDPtUEljISYa4dKKxrierM5DrZ_dnBg/s320/1176_xampp-module-service-apache-mysql-start.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_LEIxxTe5FvxJwIkXpJw61lDYJ67q_WskRdbRxjkzaL0LjsulufdrfazW_m5KFgOSLTY7mHjP-HRKZBafGHJpr7Ye3bSqFVBAkEax3ZBOMtw5zLDPtUEljISYa4dKKxrierM5DrZ_dnBg/s72-c/1176_xampp-module-service-apache-mysql-start.png
GetYarn
https://getyarn.blogspot.com/2017/06/how-to-setup-xampp-server-on-your-pc.html
https://getyarn.blogspot.com/
http://getyarn.blogspot.com/
http://getyarn.blogspot.com/2017/06/how-to-setup-xampp-server-on-your-pc.html
true
6634423068030231660
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy