# Tutorial - How to host your website on your computer



## cancer10 (Apr 2, 2008)

*Tutorial - How to host your website on your computer (For Beginners Only)*

Hi,

This is a tutorial on how to host your website on your PC.


1) Download CIS WebServer from Here

2) Install it (its very easy to install like other programs).

3) After installation, run the program from _Start > Programs > CIS WebServer > CIS WebServer.exe_. You will see a screen similar to the following:

*www.cupidsystems.com/products/webserver/images/screenshot_webserver.jpg

A little description about each of the controls.

    * Status = Current status of the server.
    * Site Hits = Total hits your site got till now.
    * Users Connected = Total unique visitors connected to your site.
    * Bytes Sent = Total size of packets sent from your PC.
    * Bytes Received = Total size of packets received to your PC.
    * Server Uptime = Total time since the server is running.
    * Local Address = Is the local server address which can be accessed through LAN. or you can use *localhost/ instead.
    * Your Site Located At = This is the IP address through which your site can be viewed on LAN and Internet.
    * Connected IP Address = Visitors IP address who has visited your site with Date and Time.
    * Save Auto Log = Automatically save logs of the visitor's IP address.
    * Enable IP Listing = Enables IP listing in the listbox. If unchecked does not logs any IP addresses.


4) Click on the _Settings button > Set path_

5) Clicking on the Set Path shows you another window, where in you can select the_ Drive > Directory _name where you have your index.html file. (index.html file is the main file that shows as your default homepage)

6) Click on _Settings > Preferences > HTTP Options_. 

You can set the Preferences of your web server. You can set your desired Port number. But it is recommended that you set your Port number to 80. You can enable a music file if you want it to play when a user visits your site. Checking on Run on Startup enables your WebServer to run automatically when Windows Starts. You can ban IP address of your visitors. Press Ban IP to show the Ban IP window. Click Save to save the settings.

7) You are done. Open your browser and type * followed by your IP address. or you can simply click on the Your Site is Located at link on the web server. You can see your index.html file in this way.


----------



## anand1 (Apr 2, 2008)

It can also be done with the IIS server configured on your system. Why not use Windows than going for the third party software. Anyways thanks for sharing.


----------



## cancer10 (Apr 2, 2008)

Well, its for newbies and beginners.

Damn, I should have mentioned it in my post. My bad


----------



## chesss (Apr 2, 2008)

will this(or IIS) work with shared external I.P?

Thx for the tut btw


----------



## siddes (Apr 2, 2008)

I'm not sure if IIS is free. 

In which case Apache would be a better option (as of Feb 2008, 50% of all websites are hosted on it) because of continuous ongoing development, and because it's open source.

Going by the Mozilla FF project, it should have lesser bugs than IIS.

And if you want a quick, easy-to-use package, consider EasyPHP, which is a combination of an Apache web server, MySQL and PHP extensions.


----------



## chesss (Apr 2, 2008)

and how does this work if the PC has dynamic IP?? sry if noobish Q's


----------



## axxo (Apr 3, 2008)

chesss said:


> and how does this work if the PC has dynamic IP?? sry if noobish Q's



^^need to make use of noip.com or dyndns.com or similar service


----------



## aakash_mishra (Apr 3, 2008)

There is one more software like this called WebSite Robot


It can be downloaded from here


----------



## DigitalDude (Apr 3, 2008)

wamp and xampp are the best all in one installation softwares (webserver+php+mysql+phpmyadmin)



_


----------



## cancer10 (Apr 3, 2008)

ok I have changed the subject and added (For Beginners Only). 

Hence Apache or IIS shouldnt be compared to this software


----------



## DigitalDude (Apr 3, 2008)

^^^

actually its not just the question of skills... we say apache or IIS because they are very secure and not that complex as people think.... 

maybe if people just want to play with, this software might be useful...


_


----------



## DigitalDude (Apr 3, 2008)

^^^

you can install IIS server from Win XP installation CD


_


----------



## victor_rambo (Apr 3, 2008)

Even if we setup a webserver using any of these servers, the prohibitions it will impose on our PC habits are too discouraging. Instead, such home servers are more suitable for development purposes.


----------



## DigitalDude (Apr 3, 2008)

^^^^

of course no sensible website can be run from home (in India)


_


----------



## Ramakrishnan (Apr 3, 2008)

I presume one should have enough bandwidth to do this.


----------



## Gigacore (Apr 3, 2008)

cancer10 said:


> Well, its for newbies and beginners.



Thats me! Thanks!


----------



## DigitalDude (Apr 3, 2008)

^^^^

liar 



_


----------



## axxo (Apr 3, 2008)

anothor honourable mention would be*HFS ~ HTTP File Server*


----------



## chesss (Apr 4, 2008)

^Thanks for the mention 
This is a really really useful  thread 
Bookmarked!


----------



## hsr (Apr 4, 2008)

Well for the sake of you all, can giv you a text file, from some site that explains hosting with apache.

Google source :  *www.google.com/search?hl=en&safe=o...+PHP+,+MySQL+,+Perl+,+phpMyAdmin"&btnG=Search
How to set up a server with Apache , PHP , MySQL , Perl , phpMyAdmin.txtx

How to set up a server with Apache , PHP , MySQL , Perl , phpMyAdmin

=====

Let's start by installing apache (http server) . you can download the
apache installer on www.apache.org . download the verion you like ,
even thought , in win systems i recomand verion 2 (this tutorials is
for apache 2) . here is a link for it :

Code:
*apache.mirror.nedlinux.nl/dist/httpd/binaries/win32/apache_2.0.52-win32-x86-no_ssl.msi


for a faster mirror , visit *httpd.apache.org/download.cgi .

After downloading the file (.msi installer) , run it . The installation wizard
is a next , next , finish 'work' ... The installer will ask you some details like
your server name , your server adress and the admin's mail adress . if
you have a domain name or a hostname , enter the info's like this :

Code:
Server Name : your_domain.org

Server Adress : www.your-domain.org

Admin Email : admin@yourdomain.org


if you don't have one , you should get on e free at :

Code:
*www.no-ip.org/


Check the 'Run as a service for all users on port 8080' option and click
next , finish to fiinish the instllation . Advice : Install it in c: (he creates
a folder for it , don't worry) to make sure you configure it easyer .
If you are finished , open up a browser and write in the adress bar :

Code:
*localhost/


If you will see a 'Test Page for Apache Installation' , everything works .

=====

Let's install PHP . download the archives from www.php.net . Here is a
direct link for verion 4.3.9 :

Code:
*nl.php.net/get/php-4.3.9-Win32.zip/from/this/mirror


Make sure you download the archive and not the installer . Ok! after
downloading it , extract the archive in c:/php (this is to simplify paths) .
Now , open up c:/apache/conf/httpd.conf and search for this line :

Code:
#LoadModule ssl_module modules/mod_ssl.so


under that line , add this :

Code:
LoadModule rewrite_module modules/mod_rewrite.so

LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4


Now search for this line :

Code:
<Directory "C:/Apache2/htdocs">


Change :

Code:
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride None


into :

Code:
Options Indexes Includes FollowSymLinks MultiViews ExecCGI

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All


This will allow .htaccess support on your server and make sure you can
see the content of a folder without getting a 403 forbidden error .

Now search for :

Code:
DirectoryIndex index.html index.var.html


and change it into :

Code:
DirectoryIndex index.html index.php


Save the file and restart apache . (you can restart it by pressing the
Restart apache server shortcut in the start menu or by writing :

Code:
net apache restart


in a command prompt window . Ok!

you have php working for your server icon_wink.gif . Now let's configure php and
make sure it really works ! Open up c:/php/php.ini (php.ini-dist renamed)
and search for this paragraph :

Code:
max_execution_time = 60    ; Maximum execution time of each script, in seconds
max_input_time = 60   ; Maximum amount of time each script may spend parsing request data
memory_limit = 5M      ; Maximum amount of memory a script may consume (8MB)


you should change this to whatever you want . here is an option i use :

Code:
max_execution_time = 300    ; Maximum execution time of each script, in seconds
max_input_time = 300   ; Maximum amount of time each script may spend parsing request data
memory_limit = 5M      ; Maximum amount of memory a script may consume (8MB)


Now search for :

Code:
register_globals = Off


and change it into :

Code:
register_globals = On


Search for :

Code:
extension_dir = ".\"


and change it into :

Code:
extension_dir = "c:/php/extensions"


assuming you have installed php in c: ...

Search for :

Code:
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.


and uncomment (delete the ; in the front) the following modules :

Code:
extension=php_bz2.dll
extension=php_db.dll
extension=php_gd2.dll
extension=php_java.dll
extension=php_msql.dll
extension=php_pdf.dll
extension=php_pgsql.dll
extension=php_sockets.dll


Ok! now let's change the smtp settings (this is good icon_smile.gif for you mail()
function . you need this !!!) Search for :

Code:
[mail function]
; For Win32 only.
SMTP =
smtp_port = 25

; For Win32 only.
;sendmail_from =


and change to :

Code:
[mail function]
; For Win32 only.
SMTP = mail.isp.org
smtp_port = 25

; For Win32 only.
sendmail_from = mail@your_domain.org

if you don't have a mail server or :

Code:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = mail@your_domain.org

if you have a mail server ...

Save the files . Now let's finalize the php installation . copy all the dll's
from c:/php/dlls into c:/windows/system32 . copy c:/php/php4ts.dll into
c:/windows/system32/ and copy php.ini from your folder php into
windows and system32 folder . restart apache . open up notepad and
add this into the file :

Code:
<?php
   phpinfo();
?>


save this file in your htdocs folder (c:/apache/htdocs) as info.php and
open up a browser . in the adress bar write :

Code:
*localhost/info.php


you should see php's configuration in a table . a looong file icon_smile.gif
you can optionaly install zend optimizer . i am using it ... it doesn't
needs a tutorial . to install the PEAR modules for php , just run the
go-pear batch from the php folder and 2click the reg file to finish the
instllation .

=====

let's install mysql . download mysql from *www.mysql.com/ .
this tutorial applyes to verion 4.0.* ... i don't recomand using mysql
4.1 . here is a direct link :

Code:
*dev.mysql.com/get/Downloads/MySQL-4.0/mysql-4.0.22-win.zip/from/*mysql.proserve.nl/


after downloading , extract the arhive somewhere and run the setup.exe .
install mysql in c:/mysql and complete the installation . open up command
prompt and write this :

Code:
cd mysql
cd bin
mysqld-max-nt --install


this will install mysql as a service . recomended . now you would probably
consider downloading mysql control center . a gui tool to administrate the
server in a graphical mode . here is a link :

Code:
*dev.mysql.com/get/Downloads/MySQLCC/mysqlcc-0.9.4-win32.zip/from/*mysql.proserve.nl/


install it like any other program and run the shortcut in the desktop . a
window will pop-up . it will ask you to add a new connection . here are the
info's you need to fill in :

Code:
name : localhost or main or whatever 
host : localhost
user : root
pass :


click add , expand the databases menu and delete databse text . now
expand the users menu and delete all users except root@localhost . right
click it and select edit user . change it's password to whatever you want icon_smile.gif
now right click the server and select edit . change the password to the
pass you chosed for user root . as easy as that . mysql is installed !

=====

phpMyADmin . you can download it from *www.phpmyadmin.net/ .
i recommend using verion 2.5.1 pl1 . the last verion is still bugy icon_smile.gif
download , unzip the contecnt into a folder in htdocs (phpMyAdmin) and
open up config.inc.php with a text editor .

search for :

Code:
$cfg['PmaAbsoluteUri'] = '';


change it to your phpmyadmin url . eg. :

Code:
$cfg['PmaAbsoluteUri'] = *www.your_domain.org/phpMyAdmin/';


now search for :

Code:
$cfg['blowfish_secret'] = '';


and change it to your mysql root password like this :

Code:
$cfg['blowfish_secret'] = 'password';


now search for :

Code:
$cfg['Servers'][$i]['auth_type']     = 'config';


and change it to :

Code:
$cfg['Servers'][$i]['auth_type']     = 'cookie';


save and exit . that's it ! phpMyAdmin works icon_wink.gif

=====

Perl . Optioanl for your server , very usefull . i recomend you to install
it . you can download it from *www.activestate.com/ . here is a
direct link :

Code:
*downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.4.810-MSWin32-x86.msi


download , install and you are ready . put your perl scripts in the /cgi-bin/
folder (c:/apache/cgi-bin) .

=====

Hope this helped , you're welcome .
Google Source :  *www.google.com/search?hl=en&safe=o...+PHP+,+MySQL+,+Perl+,+phpMyAdmin"&btnG=Search


----------



## DigitalDude (Apr 4, 2008)

^^^^

if you cant give the source plzz dont post anything... yeah I dont need to pay you.. someone else wrote that.. 

source: *programmerworld.net/articles/tips/install_apache.php


and there are ton of tutorials for installing apache+mysql+php 
*www.google.com/search?hl=en&q=install+apache+mysql+php


_


----------



## Gigacore (Apr 4, 2008)

hari_sanker_r said:


> Hope this helped , you're welcome . _*No , you don't need to pay*_



Clever


----------



## hsr (Apr 4, 2008)

All you damn people specially, Mr.D.Dude is taking thigs in a freak way, All Freaks look at my head line, it says :  Well for the sake of you all, can giv you a text file, *from some site* that explains hosting with apache.

I clearly mentioned that it is from a site that i don't know i do'nt get the credit mister, and you don't try to mess around me @ DIGITALDUDE coz Dudes are cool and you're not you're too freaky to be a Dude. and hey mister, i don't get any damn thing by posting this article and that too i am wasting my bandwidth (approx 4Kb He He).
Sorry if i am rude, i'll be cool later.


----------



## axxo (Apr 4, 2008)

hari_sanker_r said:


> All you damn people specially, Mr.D.Dude is taking thigs in a freak way, All Freaks look at my head line, it says :  Well for the sake of you all, can giv you a text file, *from some site* that explains hosting with apache.
> 
> I clearly mentioned that it is from a site that i don't know i do'nt get the credit mister, and you don't try to mess around me @ DIGITALDUDE coz Dudes are cool and you're not you're too freaky to be a Dude. and hey mister, i don't get any damn thing by posting this article and that too i am wasting my bandwidth (approx 4Kb He He).
> Sorry if i am rude, i'll be cool later.



if its a site no harm in providing exact link to the source..why you want to hide the link..afterall you didnt get these in a mail..to ask u post the link to ur inbox


----------



## victor_rambo (Apr 4, 2008)

Instead of following the procedure hari_sanket_r posted(or copied or whatever), simply download WAMP or XAMPP installer pachakge. It will install Apache, PHP, MySQL at least.


----------



## axxo (Apr 4, 2008)

rohan_shenoy said:


> Instead of following the procedure hari_sanket_r posted(or copied or whatever), simply download WAMP or XAMPP installer pachakge. It will install Apache, PHP, MySQL at least.



..more easy way..also installs filezilla ftp server.an added advantage.


----------



## cancer10 (Apr 4, 2008)

filezilla ftp server sucks


----------



## siddes (Apr 4, 2008)

I'd still go with EasyPHP. It also has phpMyadmin and MySQL and Apache.

And more importantly, one of the FastTracks was about hosting your own site, and it almost exclusively spoke of EasyPHP, so it's recommended by the fine chaps who run this forum.


----------



## hsr (Apr 5, 2008)

@ axxo i did'nt get it via a website or any e-mail, juust see the attachment, i've got to a 1000+ tutorials and hacks and that came in a rar file from Phazeddl.com i don't know which site it is!


----------



## DigitalDude (Apr 5, 2008)

^^^

from your orkut profile photo you seem to be a kiddo  so I cant be angry at you 

dont get angry man... if we post something here we need to give the original content creator the credit... no matter how small the work is 

and you should not show much attitude like 'you need not pay' etc that will make people surely angry...

I was never even angry at you in my post notice the use of   and  if I was mad I would have used      like you

and its not a very complicated process... just copy a few lines, paste it in google its going to bring you the source in a jiffy.. easy enough ? 



_


----------



## hsr (Apr 6, 2008)

Okay  @ D.dude, pls look my jpg. attachment, then say that agan!
I google it but turned out to be a login page
here is the google link 
*www.google.com/search?hl=en&safe=o...+PHP+,+MySQL+,+Perl+,+phpMyAdmin"&btnG=Search

i am a kiddo, just completed my 10th and waiting for results!  i am illegal on Orkut !  even on Digit, i joined on my 9th Std ....... Far too much any Kid can go He He


----------



## DigitalDude (Apr 6, 2008)

ok no probs....

but dont search for title... you will not get the source.. just copy a part of the tutorial text and search... 


_


----------



## hsr (Apr 7, 2008)

okay thnx DD happy holidays! i'll be off for a month, coz i'm goin for IIT-JEE coaching from 21st. and OOPS in c++, java, asp.net and 3D S max. Bye...


----------



## DigitalDude (Apr 7, 2008)

^^

Best of Luck 



_


----------

