Beginners Guide for XAMPP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Beginners Guide for XAMPP

Postby WorldDrknss » 31. October 2005 10:30

Starting your own web server

Have you ever wanted to start your own web server but can't figure out where to begin, what do you need; well look no further as we are going to show you how to begin running a fully functional website.

What You Need:

1. Apache
2. MySQL
3. PHP
4. phpmyadmin or cpanel

or better yet just download XAMPP it includes everything you need already configured; it includes Apache web server, MySQL, PHP, PHPMYADMIN, Pearl, Open SSL, Mercury Mail Server, Filezilla and more.

How to Setup XAMPP:

1. Download XAMPP installer
2. Double click on the installer
3. Install to C:\xampp
4. Install all the service and start them
5. Once XAMPP is installed you should see a XAMPP control panel, if it doesn't open right after the install process then click on the shortcut on your desktop.
6. Confirm that Apache and MySQL are running.
7. Start your favorite broswer and type http://localhost
8. Click on the "Security" Link
9. Click on "http://localhost/security/xamppsecurity.php" link and set a password for XAMPP directory and the password for MySQL
10. Go back to "Security" and scroll down the page you will then see some ports the XAMPP uses, you will need to open this ports in your firewall and router to have access to your site via the web.
11. Now create a new directoty in C:\ called www
12. Now create another directory in C:\www called anything you want.
13. Now Navigate to C:\xampp\xampp\apache\conf
14. Open httpd.conf in your favorite text editor
15. Scroll down to the very bottom and delete everything starting at #NameVirtualHost *:80
In other words your going to delete the following:

#NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

16. Now replace what you have just deleted with:

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:/xampp/xampp/htdocs
ServerName localhost
</VirtualHost>

17. Now remember when I had you create your C:\www and another directory in C:\www now lets say that you made the directory called main so now main is in C:\www\ this is the directory where your going to have your web files in.
18. Now go back to httpd.conf and add the following after the one we just created above

<VirtualHost *:80>
DocumentRoot C:/www/main
ServerName localhost.main.com
</VirtualHost>

Notice that // or reversed from \\, this is a must for apache to work.
19. Now navigate to C:\WINDOWS\System32\Drivers\etc\
20. Open the file called Host or Hosts
21. you should see where is says 127.0.0.1 localhost now what you want to do is add the following:
127.0.0.1 localhost.main.com this will allow you to access your web files that are in C:\www\main.
22. You can add as many sites as you want just keep adding directories in C:\www and creating a VirtualHost as describe above pointing to the correct directory and giving it a name, then edit you Hosts file to allow you to access the web content in the folder.
23. If your going to go live then you don't need to edit the hosts file, but you will need some type of domain name to use so apache nows where to receive the right web contents.

24. That is the basic to get apache running and for you to begin creating website.

My VirtualHost:

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:/www/thegamerslounge
ServerName thegamerslounge.game-host.org
ServerAlias www.thegamerslounge.game-host.org
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:/www/gamersworld
ServerName gamersworld.game-host.org
ServerAlias www.gamersworld.game-host.org
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:/www/personal
ServerName thewiccanslounge.blogdns.org
ServerAlias www.thewiccanslounge.blogdns.org
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:/xampp/xampp/htdocs
ServerName localhost
</VirtualHost>

and my site is live so please make an effort to visit it at the following The Gamers Lounge
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby London » 06. November 2005 06:22

Thanks, this should be a sticky in my opinion....very well detailed.
London
 
Posts: 9
Joined: 06. November 2005 01:27

Postby WorldDrknss » 06. November 2005 12:24

wow...I've must have been realy bored if I wrote that and with easy to follow instructions, It should be a sticky it would help so many people in setting up XAMPP and there would be less problems. I should have included on how to setup FileZilla and Mercury Mail and how to get your mail sever to work with PHP sites because you have to use SMTP because php mail does not work on the windows platform. Hope it helps..
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby London » 06. November 2005 18:25

Well it's never too late to write those other tutorials...*hint hint*.
London
 
Posts: 9
Joined: 06. November 2005 01:27

Postby WorldDrknss » 07. November 2005 02:40

I will begin writing them tuesday because its the only time that I have to write a Guide for Mercury Mail and FileZilla, I will also include how to make your own signed CA certificate and how to add SSL to your webpage.
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby oskym » 09. November 2005 02:46

Starting your own web server

Have you ever wanted to start your own web server but can't figure out where to begin, what do you need; well look no further as we are going to show you how to begin running a fully functional website.


Thanks you!

I'll really helps a lot
oskym
 
Posts: 1
Joined: 04. November 2005 23:44

Postby WorldDrknss » 12. November 2005 12:59

Well guys if you need my help you can post in my forums since I check it more than I come here.

My website is http://www.thegamerslounge.game-host.org
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby Foxy » 12. November 2005 22:24

I have a DNS that support sub domains so all i have to do is add:

ServerAlias something.domain.com

In my:

<VirtualHost *:80>
DocumentRoot C:/www/main
ServerName localhost.main.com
</VirtualHost>


right ?
Foxy
 
Posts: 37
Joined: 08. November 2005 21:18

Postby WorldDrknss » 12. November 2005 23:56

You would create another virtualhost for subdomains

ServerAlias is so that you can use www
Code: Select all
<VirtualHost *:80>
DocumentRoot C:/www/thegamerslounge
ServerName thegamerslounge.game-host.org
ServerAlias www.thegamerslounge.game-host.org
</VirtualHost>

Example of subdomain
<VirtualHost *:80>
DocumentRoot C:/www/thegamerslounge/testsite
ServerName test.thegamerslounge.game-host.org
ServerAlias www.test.thegamerslounge.game-host.org
</VirtualHost>


btw I activated your account on mysite, you forgot to activate by the email that was sent to you.
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby Foxy » 13. November 2005 08:42

I would add a ServerAlias at:

Code: Select all
<VirtualHost *:80>
DocumentRoot C:/xampp/xampp/htdocs
ServerName localhost
</VirtualHost>


if you want C:/xampp/xampp/htdocs to be viewed.
Foxy
 
Posts: 37
Joined: 08. November 2005 21:18

Postby WorldDrknss » 13. November 2005 11:51

You dont need to use ServerAlias but thats its where you would add it.
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby kardan » 17. November 2005 05:14

This is very handy post.
Thank you, man.
kardan
 
Posts: 1
Joined: 09. November 2005 19:54

Postby elwiz » 19. November 2005 20:28

WorldDrknss wrote:I will begin writing them tuesday because its the only time that I have to write a Guide for Mercury Mail and FileZilla, I will also include how to make your own signed CA certificate and how to add SSL to your webpage.


*eager* that would be very nice of course *eager*

just got it going on windows, should get it up on the penguin machines tomorrow, but about the mail - I have no clue..
elwiz
 
Posts: 2
Joined: 19. November 2005 20:26

Postby AcCuMuL8r » 21. November 2005 06:18

yes..awaiting patiently...kinda!
tired of seeing:
Code: Select all
Couldn't get mail server response codes

DEBUG MODE

Line : 115
File : smtp.php
AcCuMuL8r
 
Posts: 4
Joined: 13. November 2005 02:03

Postby WorldDrknss » 23. November 2005 02:53

To send email through your website you have to use SMTP, you can't use php mail to send email. Open up mercury click on configuration then click on mercury Core Module, then click on Local Domains and add your domain. Then click ok. Then click on configuration again then click on Protocal Modules- and uncheck everything execpt:
MercuryS SMTP Server
MercuryP POP3 Server
MercuryC SMTP Relaying Client
then click ok.
Then go back to configuration, MercuryC SMTP Client, then fill in your ISP SMTP Server and You ISP UserName and Password then click ok.
Then go back to configuration-manage local users, and your Name
Then go to your website choose smtp as your mail sever, fill in your email addess yourname@yourdomain and for outgoing put in localhost and type in your password then you set in manange local users.
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 115 guests