SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 40

Thread: Web Server at Home--Basic Concepts?

  1. #1
    SitePoint Enthusiast daveg7's Avatar
    Join Date
    Oct 2008
    Location
    Berkeley, California, U.S.
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Web Server at Home--Basic Concepts?

    I tried installing Apache and, later on, Wampserver. I also tried looking up this topic in Build Your Own Database Driven Web Site, Using PHP and MySQL.

    My goal is to see, on my home computer, how my new Web pages would look as I work on them, and that includes things like includes, which can't be seen on a regular home computer (mine is Vista). Later on, I also expect to play around a lot with PHP.

    OK, how am I supposed to do this? Is there a folder on my home computer where these files should be? Do I need to install them on another computer on my home LAN?

    I just don't get these first basic steps; I don't know what to look for.

    Thanks for your help.

    Dave

  2. #2
    Visible Ninja bronze trophy
    JeffWalden's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,699
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    When you install Apache there will be a root folder for each of the websites. This folder is where you'll place your HTML or PHP files. The folder is generally named www or httpdocs. I haven't setup an Apache server in quite some time so I'm not sure what the default is.

    You can look through the configuration file for Apache and find or change this document root.
    TAKE A WALK OUTSIDE YOUR MIND.

  3. #3
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,424
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Vista runs IIS7 and is perfectly capable of running PHP and showing your includes, etc. Just add it using add/remove features and map virtual directories/sites as appropriate. Lots more info on http://www.iis.net/

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    15,815
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    Vista runs IIS7 and is perfectly capable of running PHP and showing your includes, etc. Just add it using add/remove features and map virtual directories/sites as appropriate. Lots more info on http://www.iis.net/
    That wouldn't help much though if the live server is running Apache. It is better to try to get at least a reasonably close match between the software running the test and live environments as it leaves less room for differences in the way the code will run on the two environments.

    Ideally find out what your live hosting is running and install the same versions of the same products onto your computer to set up your test environment.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,424
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Depends--it should be a good enough facimilie if he is just using SSI or some basic PHP scripts (which it sounds like). Now, if he is actually using some features of Apache then he probably will want apache. In either case, vista can run that just fine too.

  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    England
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could run both an apache server and IIS server. I know it can be overkill but its a great way to get to grips with both.

    I run both on my computer, apache runs through port 80 with mysql and IIS runs through port 8080 and runs sql server express.

  7. #7
    SitePoint Member
    Join Date
    May 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    You can use any of web server apache or IIS. But my recommendation would be to go for IIS as you will find it easy then Apache. Its even easy to install and you can get all help needed over internet or from Microsoft support.

    Thanks,
    Steve
    Thesslstore
    Rapidsslonline

  8. #8
    SitePoint Member Zada's Avatar
    Join Date
    Dec 2007
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would use mamp
    http://www.mamp.info/en/index.html
    it can set up a small server on your home computer with out much work at all. It is simple to use and has all the capabilities you will need for testing. I use it a lot because I have a dial up internet connection and I can't keep connecting to my server and uploading a new file every time I make a change.

  9. #9
    Floridiot joebert's Avatar
    Join Date
    Mar 2004
    Location
    Kenneth City, FL
    Posts
    822
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do I need to install them on another computer on my home LAN?
    "need to", no. If you have an older computer you're not using for anything special, I would if I were you though. It's easier to learn without fear of losing everything if you're server is on another computer that you have no problem wiping and starting over with.

  10. #10
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    8,990
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zada View Post
    I would use mamp...
    Errrm...MAMP is for Mac OS X, not Windows.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  11. #11
    Non-Member
    Join Date
    Sep 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by daveg7 View Post
    I tried installing Apache and, later on, Wampserver. I also tried looking up this topic in Build Your Own Database Driven Web Site, Using PHP and MySQL.

    My goal is to see, on my home computer, how my new Web pages would look as I work on them, and that includes things like includes, which can't be seen on a regular home computer (mine is Vista). Later on, I also expect to play around a lot with PHP.

    OK, how am I supposed to do this? Is there a folder on my home computer where these files should be? Do I need to install them on another computer on my home LAN?

    I just don't get these first basic steps; I don't know what to look for.

    Thanks for your help.

    Dave
    Have you tries any of their advice? I had the same goal before, but I don't have time to do it well. Then I gave up.

  12. #12
    SitePoint Addict
    Join Date
    Aug 2006
    Posts
    288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zada View Post
    I would use mamp
    http://www.mamp.info/en/index.html
    it can set up a small server on your home computer with out much work at all. It is simple to use and has all the capabilities you will need for testing. I use it a lot because I have a dial up internet connection and I can't keep connecting to my server and uploading a new file every time I make a change.
    Wamp for windows. You can have everything up and running in 5 minutes

    http://www.wampserver.com/en/

  13. #13
    SitePoint Zealot cholmon's Avatar
    Join Date
    Mar 2004
    Location
    SC
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I suggest grabbing a copy of VirtualBox and an ISO for whatever OS you're running on your production web server (Ubuntu? CentOS? Debian?), and just run it locally. That way you can get your dev environment very close to the setup that you're running in production with no need for another physical machine.

    VBox can also use a bridged network connection with your native network card, so your virtual linux server can have it's own IP address on your LAN, which makes it easy to do do browser testing not only from IE (on your host machine), but from any other machine on your LAN.
    Drew C King: PHP Developer
    <?= $short_tags++ ?>

  14. #14
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use Xampp lite, with it's own installation program.
    http://www.apachefriends.org/en/xampp-windows.html

    you create your various test sites in their own sub folder inside the htdocs folder inside the xampplite subfolder which is inside the xampp folder.

    You must remember to start the web server, using xampp_start.exe whenever you wish to use it (and stop it when finished to avoid wasting resources - guess what to use to stop it)
    You reference your site / files as http://localhost/sitename/filename.whatever

  15. #15
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If your just wanting to get a server up and running, then I'd suggest XAMPP also. XAMPP has its own executable file, and can be setup within 5 minutes, it automatically installs using XAMPP you can run PHP, Perl, Ruby On Rails (I Belive) and now recently ASP. XAMPP is 10 folds better then WAMP, in my opinion.

  16. #16
    From Italy with love bronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    8,604
    Mentioned
    76 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by cshwebdev View Post
    XAMPP is 10 folds better then WAMP, in my opinion.
    Why?

  17. #17
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guido2004 View Post
    Why?
    Simply because of the ease to install (Which is still my opinion), and get a newbie going. I tried WAMP when I first started doing web design and development, and had some problems with it till I found XAMPP and I use that on all of my OS, besides my HP which I self installed Apache/MySQL, now, not a single problem with any of them.

  18. #18
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i suggest you to use appserv, it's a linux server application for window included php and mysql modules. after installation you will find c:\appserv\www\

    the www is main document root.
    place your html files there or make a folder for it like "mysite" and than called it

    localhost/mysite/

    later you can change this document root from httpd.con file

  19. #19
    SitePoint Addict SitePoint Award Recipient
    Join Date
    Apr 2001
    Location
    Devon, UK
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here are some articles that should help if you want to install a web server manually. It takes a little longer than something like XAMPP, but you'll learn a lot more...

    http://www.sitepoint.com/blogs/2009/...he-on-windows/
    http://www.sitepoint.com/blogs/2009/...hp-on-windows/
    http://www.sitepoint.com/blogs/2009/...install-mysql/
    http://www.sitepoint.com/blogs/2009/...virtual-hosts/
    Optimalworks Ltd web design and IT consultancy, Devon UK
    http://www.optimalworks.net/

    We produce elegant, standards-based, accessible websites:
    Valid XHTML, CSS, JavaScript, DOM scripting, AJAX, PHP, .NET

  20. #20
    SitePoint Enthusiast
    Join Date
    Oct 2009
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I prefer apache , have static ip, linux
    linux will stay up for months or year plus without any restart
    apache stable and reliable
    have static to point dns
    best web hosting
    all you need to know about web hosting.

  21. #21
    SitePoint Addict Newviewit's Avatar
    Join Date
    Apr 2008
    Posts
    241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.apachefriends.org/en/xampp-windows.html

    Don't know how much easier it can get to set up...can be up and running in 5 minutes.

    Xampp has also been around for a long time and is very established. Forums are full of info if you run into problems and very helpful
    UNLIMITED Domains - UNLIMITED Disk Space - UNLIMITED Bandwidth
    *Black Friday - Website Hosting Deal of The Year - 50% OFF!

  22. #22
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, how am I supposed to do this? Is there a folder on my home computer where these files should be? Do I need to install them on another computer on my home LAN?

  23. #23
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    (janaserver.de/start.php?lang=en) sorry, my first post, i am not allowed to include the link.

    Janaserver runs without installation on Windows, but has a lot more features which may be useful for testing your website locally. Good thing is, you can make the local testpage available on the internet for your friends. If you find time, Janaserver also has lots of features build in such as email server, proxy and so on. Is up an running since ages, even a low resources PC will do.

    Regards

    Nik

  24. #24
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Personally I use wamp and have not problems.

    I have my hosts file and httpd file as shortcuts on my desktop and create virtual websites to match the name of the live site I will be working on, no problem, as was posted earlier.

    Cheers,

    Malky

  25. #25
    SitePoint Enthusiast daveg7's Avatar
    Join Date
    Oct 2008
    Location
    Berkeley, California, U.S.
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    I'm not getting what I want. Here are the steps I followed:

    1. I installed Xampp Lite in Vista and noted that my files should be under C:\XAMPP\xampplite\htdocs or a subfolder.

    2. I put some index and include files that I'd written under htdocs, and had html and html versions of the index file.

    3. I put the following in my browser address bar: http://localhost/index.shtml

    4. I also tried: http://localhost/index.html

    5. I got nothing in Windows Explorer, Firefox, and Chrome. (In Explorer, the message was "HTTP 404 Not Found.") (When I uploaded the shtml and include files to my ISP's server, it worked fine.)

    Thanks for getting me this far; now what do I do next?

    Dave

    Quote Originally Posted by Dr John View Post
    I use Xampp lite, with it's own installation program.
    http://www.apachefriends.org/en/xampp-windows.html

    you create your various test sites in their own sub folder inside the htdocs folder inside the xampplite subfolder which is inside the xampp folder.

    You must remember to start the web server, using xampp_start.exe whenever you wish to use it (and stop it when finished to avoid wasting resources - guess what to use to stop it)
    You reference your site / files as http://localhost/sitename/filename.whatever

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •