SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 29
  1. #1
    SitePoint Member
    Join Date
    Oct 2010
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Beginner's help with Apache installation

    Hello,
    I am a novice amateur WEB programmer. I am reading now Kevin Yank's "Build your own database driven WEB site with PHP and MySQL".
    I proceeded with MySQL, Apache, PHP installation as was recommended in the book installing them separately.
    As far as I can perceive I succeded with "Apache HTTP Server 2.2.17" installation. I have no idea if I had already web server running on my Windows XP computer, therefore I selected "only for the Current User, on Port 8080, when started Manually" configuration option.
    When checking if the installation is done properly with typing "http://localhost:8080" in browser address window I receive the expected "It works!" congratulation. From the other hand I don't see any server working in the "Service status" window of "Apache Service Monitor" and all the "start", "stop", restart" buttons are disabled.
    Thus I am not sure ifI have Apache working or not.
    I found some error in error log, which might have not any significance though:
    "[Sat Oct 30 13:45:24 2010] [notice] Child 4224: Starting thread to listen on port 8080.
    [Sat Oct 30 13:45:40 2010] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico"

    Would appreciate any help.
    Last edited by ralph.m; Oct 30, 2010 at 08:27. Reason: removed reference to duplicate posts

  2. #2
    SitePoint Member
    Join Date
    Apr 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure why the buttons are disabled, but it sounds like your Apache is working. The two messages in the log aren't errors.

    You may want to try XAMPP - it automatically sets up Apache, PHP, MySQL and more: XAMPP

  3. #3
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    CS,

    When I installed on my XP box, I first used services.msc to stop and prevent IIS from starting with Windows (see properties). THEN I was able to install Apache using port 80 and never looked back. In your case, I'd UNINSTALL Apache, shut down IIS from Services, then REINSTALL Apache properly so avoid problems.

    Kudos to you for using the "proper" way to install the WAMP daemons (according to Kevin Yank) rather than XAMPP or WAMPP which only provide a "snapshop" and can never match your host's installation (after all, a test server is best when it duplicates the online services). Be sure to follow the additional tips regarding enabling mod_rewrite linked in my mod_rewrite tutorial (see my signature).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  4. #4
    SitePoint Member
    Join Date
    Oct 2010
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, dklynn and yuguo.
    I think nevertheless my Apache setup is working properly because I performed another check with simple PHP script returning current data and it worked.
    dklynn, I will proceed with your recommendation on disabling IIS and reinstallation of Apache. Could you, please, elaborate more on how to disable (check it is disabled) the IIS?

  5. #5
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    cs,

    Yes (from memory - I'm now on Win7):

    Start | Run and type in services.msc. That will start Window's Services module which is a two panel window. On the right, scroll down the alphabetical list to find IIS and click on it.

    On the left, you'll be offered the option to STOP this service. Click on STOP.

    In the toolbar at the top, click on the Properties icon. Within the Properties pop-up window, there will be a checkbox to start the service when Windows loads. UNCHECK that box and close the Properties box. Close the Services window.

    THEN REINSTALL Apache using port 80.

    The reason for all this is that M$ installed IIS to start - using port 80 - when Windows starts. That effectively precludes any other http daemon from even being installed on your computer - unless you know to STOP IIS and prevent it's automatic starting.

    Don't forget to UNinstall Apache so you can install it properly (on port 80).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  6. #6
    SitePoint Member
    Join Date
    Oct 2010
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dklynn, thank you very much.
    I reinstalled Apache on port 80 (actually I found that IIS was disabled at my computer, thus I had not to disable it) and now the Apache Service Monitor works exactly as expected, showing Apache2.2 in service status window and even indication correct PHP version in status bar.

  7. #7
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i have tried both methods. the 8080 port installation does not allow apache to run. the port 80 installation seems to work fine; the green lite is on and all looks good. http://localhost returns the:

    "Unable to connect" window

    i have xp home edition sp 3. i did not find IIS in the services.msc list, so assume i do not have it installed.

    anyone can help, thanks, phil

  8. #8
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    phil,

    From what you've stated, it's likely that you did not install in the recommended location so you'll need to edit your httpd.conf file. IMHO (for XP only), UNINSTALL Apache then reinstall using defaults. THEN you can edit the httpd-vhosts.conf file to add local VirtualHosts in any location you have on your computer.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  9. #9
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i removed the octothorpe from the line:

    Include conf/extra/httpd-vhosts.conf

    seems to work fine now.

    Thanks, phil

  10. #10
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, almost had it. if i direct to http://localhost, i get "it works" if i try http://localhost/index.html or today.php from kevn yank's book, i get the 403 forbidden error.

    thanks, phil

  11. #11
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you check Apache error_log? If not, browse the URL http://localhost/index.html, check the error_log and paste the log entries here.

  12. #12
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dummy host error.log

    [Fri Nov 05 12:24:53 2010] [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/docs

    phil

  13. #13
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is the error.log

    Starting the Apache2.2 service
    The Apache2.2 service is running.
    rmine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    [Fri Nov 05 02:06:22 2010] [notice] Apache/2.2.17 (Win32) configured -- resuming normal operations
    [Fri Nov 05 02:06:22 2010] [notice] Server built: Oct 18 2010 01:58:12
    [Fri Nov 05 02:06:22 2010] [notice] Parent: Created child process 3212
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    [Fri Nov 05 02:06:22 2010] [notice] Child 3212: Child process is running
    [Fri Nov 05 02:06:22 2010] [notice] Child 3212: Acquired the start mutex.
    [Fri Nov 05 02:06:22 2010] [notice] Child 3212: Starting 64 worker threads.
    [Fri Nov 05 02:06:22 2010] [notice] Child 3212: Starting thread to listen on port 80.
    [Fri Nov 05 02:17:26 2010] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
    [Fri Nov 05 02:17:29 2010] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    [Fri Nov 05 03:35:16 2010] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Fri Nov 05 03:35:16 2010] [notice] Apache/2.2.17 (Win32) configured -- resuming normal operations
    [Fri Nov 05 03:35:16 2010] [notice] Server built: Oct 18 2010 01:58:12
    [Fri Nov 05 03:35:16 2010] [notice] Parent: Created child process 1768
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    [Fri Nov 05 03:35:18 2010] [notice] Child 1768: Child process is running
    [Fri Nov 05 03:35:18 2010] [notice] Child 1768: Acquired the start mutex.
    [Fri Nov 05 03:35:18 2010] [notice] Child 1768: Starting 64 worker threads.
    [Fri Nov 05 03:35:18 2010] [notice] Child 1768: Starting thread to listen on port 80.
    [Fri Nov 05 03:47:22 2010] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Fri Nov 05 03:47:22 2010] [notice] Child 1768: Exit event signaled. Child process is ending.
    [Fri Nov 05 03:47:23 2010] [notice] Child 1768: Released the start mutex
    [Fri Nov 05 03:47:24 2010] [notice] Child 1768: All worker threads have exited.
    [Fri Nov 05 03:47:24 2010] [notice] Child 1768: Child process is exiting
    [Fri Nov 05 03:47:24 2010] [notice] Parent: Child process exited successfully.
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    [Fri Nov 05 03:47:32 2010] [notice] Apache/2.2.17 (Win32) PHP/5.2.14 configured -- resuming normal operations
    [Fri Nov 05 03:47:32 2010] [notice] Server built: Oct 18 2010 01:58:12
    [Fri Nov 05 03:47:32 2010] [notice] Parent: Created child process 452
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    [Fri Nov 05 03:47:32 2010] [notice] Child 452: Child process is running
    [Fri Nov 05 03:47:32 2010] [notice] Child 452: Acquired the start mutex.
    [Fri Nov 05 03:47:32 2010] [notice] Child 452: Starting 64 worker threads.
    [Fri Nov 05 03:47:32 2010] [notice] Child 452: Starting thread to listen on port 80.
    [Fri Nov 05 05:02:27 2010] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Fri Nov 05 05:02:27 2010] [notice] Child 452: Exit event signaled. Child process is ending.
    [Fri Nov 05 05:02:28 2010] [notice] Child 452: Released the start mutex
    [Fri Nov 05 05:02:29 2010] [notice] Child 452: All worker threads have exited.
    [Fri Nov 05 05:02:29 2010] [notice] Child 452: Child process is exiting
    [Fri Nov 05 05:02:29 2010] [notice] Parent: Child process exited successfully.
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    [Fri Nov 05 05:02:37 2010] [notice] Apache/2.2.17 (Win32) PHP/5.2.14 configured -- resuming normal operations
    [Fri Nov 05 05:02:37 2010] [notice] Server built: Oct 18 2010 01:58:12
    [Fri Nov 05 05:02:37 2010] [notice] Parent: Created child process 3064
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    [Fri Nov 05 05:02:37 2010] [notice] Child 3064: Child process is running
    [Fri Nov 05 05:02:37 2010] [notice] Child 3064: Acquired the start mutex.
    [Fri Nov 05 05:02:37 2010] [notice] Child 3064: Starting 64 worker threads.
    [Fri Nov 05 05:02:37 2010] [notice] Child 3064: Starting thread to listen on port 80.
    [Fri Nov 05 05:05:16 2010] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Fri Nov 05 05:05:16 2010] [notice] Child 3064: Exit event signaled. Child process is ending.
    [Fri Nov 05 05:05:17 2010] [notice] Child 3064: Released the start mutex
    [Fri Nov 05 05:05:18 2010] [notice] Child 3064: All worker threads have exited.
    [Fri Nov 05 05:05:18 2010] [notice] Child 3064: Child process is exiting
    [Fri Nov 05 05:05:18 2010] [notice] Parent: Child process exited successfully.
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    [Fri Nov 05 05:05:24 2010] [notice] Apache/2.2.17 (Win32) PHP/5.2.14 configured -- resuming normal operations
    [Fri Nov 05 05:05:24 2010] [notice] Server built: Oct 18 2010 01:58:12
    [Fri Nov 05 05:05:24 2010] [notice] Parent: Created child process 3464
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
    [Fri Nov 05 05:05:25 2010] [notice] Child 3464: Child process is running
    [Fri Nov 05 05:05:25 2010] [notice] Child 3464: Acquired the start mutex.
    [Fri Nov 05 05:05:25 2010] [notice] Child 3464: Starting 64 worker threads.
    [Fri Nov 05 05:05:25 2010] [notice] Child 3464: Starting thread to listen on port 80.

    thanks for your help, phil

  14. #14
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    phil,

    All the "Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff] does not exist" gives a pretty good indication of the problem: You are NOT in the webspace for localhost! That privilege is limited to C:/Program Files/Apache Software Foundation/Apache2.2/htdocs. Until you use the vhost config file to allow use of "localhost domains," your webpages MUST be within the htdocs directory.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  15. #15
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    both index.html and today.php are in htdocs.

    how do i edit the vhost config file to allow the use of "localhost domains" mine lists two virtual hosts that were apparently set up when apache was installed.

    is it really possible to do this? i have been at this for days. the book implied such a simple setup.

    i appreciate your help.

    thanks, phil

  16. #16
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also, i don't have a docs folder in apache2.2 folder as listed in the warning.

    thanks, phil

  17. #17
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    phil,

    You don't need a docs folder. Why are you concerned about that?

    Unless you modified httpd.conf, the localhost "webspace" is Apache's htdocs folder.

    VirtualHost setup:

    1. Edit httpd.conf to remove the # from the line including extra/httpd-vhosts.conf

    2. Edit httpd-vhosts.conf using one of the examples in the file

    3. Edit the hosts (extensionless file) to include 127.0.0.1 localdomain

    4. Restart Apache

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  18. #18
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i only mentioned the docs folder as it is listed in the error log as part of the path to the file that couldn't be found. i'm looking for clues and help. sorry to appear so stupid; it's just that i have installed and reinstalled many times and gotten help from the apache forums and others with no success.

    1. Edit httpd.conf to remove the # from the line including extra/httpd-vhosts.conf (i did this)

    2. Edit httpd-vhosts.conf using one of the examples in the file
    (i didn't do this but this is from the httpd-vhosts.conf file.)

    <VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.funstuff
    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff"
    ServerName dummy-host.funstuff
    ServerAlias www.dummy-host.funstuff
    ErrorLog "logs/dummy-host.funstuff-error.log"
    CustomLog "logs/dummy-host.funstuff-access.log" common
    </VirtualHost>

    <VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.funstuff
    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff"
    ServerName dummy-host2.funstuff
    ErrorLog "logs/dummy-host2.funstuff-error.log"
    CustomLog "logs/dummy-host2.funstuff-access.log" common
    </VirtualHost>

    3. Edit the hosts (extensionless file) to include 127.0.0.1 localdomain

    (don't know what to do here: how?)

    i do appreciate all of the help and usually manage these things fairly well. i will not bother you again if this doesn't work.

    regards, phil

  19. #19
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    phil,

    http://localhost/ should get you Apache's default "It Works" page. If you attempt to link to a file which is not within your "webspace" (C:/Program Files/Apache Software Foundation/Apache 2.2/htdocs), you SHOULD get 403s!

    Think in terms of directories, though, NOT of files (like your code suggests).

    1. Edit httpd.conf to remove the # from the line including extra/httpd-vhosts.conf (i did this)

    2. Edit httpd-vhosts.conf using one of the examples in the file
    (i didn't do this but this is from the httpd-vhosts.conf file.)

    Code:
    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host.funstuff
    
    Irrelevant
    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.funstuff"
    That's ... what? A directory?
    ServerName dummy-host.funstuff
    I prefer NOT to use tlds, i.e., just name that "funstuff" (without the quotes)
    ServerAlias www.dummy-host.funstuff
    Ditto
    ErrorLog "logs/dummy-host.funstuff-error.log"
    Irrelevant
    CustomLog "logs/dummy-host.funstuff-access.log" common
    Irrelevant
    </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@dummy-host2.funstuff DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.funstuff" ServerName dummy-host2.funstuff ErrorLog "logs/dummy-host2.funstuff-error.log" CustomLog "logs/dummy-host2.funstuff-access.log" common </VirtualHost>
    Same comments.
    I think you're "handcuffing" yourself by stuffing your VirtualHosts into Apache's docs directory. I've had my VirtualHosts on a separate partition for years.

    3. Edit the hosts (extensionless file) to include 127.0.0.1 localdomain

    (don't know what to do here: how?)

    C:\Windows\system32\drivers\etc\hosts - and use a TEXT editor (NOT notepad as it'll force a file extension on this extensionless file).
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  20. #20
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for your help. the book made a nice fire. what a rip. phil

  21. #21
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i apologize for the comment. i need more knowledge of the whole structure.

    i didn't stuff my virtual hosts in a docs directory which doesn't exist and i should not be concerned about. i think apache handcuffed me.

    127.0.0.1 is already listed in the host dir in windows.

    would an intro book on apache help? i'm stumbling around in the dark. i guess i was naive to think this would go as easily as the book implied.

    frustrated but determined, thanks again, phil

  22. #22
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i edited the virtual host block to just funstuff

    i changed the docroot path to "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

    all seems to work fine now. the "today" script works now.

    was it just the path thing? why did apache install, create a path that didn't exist?

    still a bit confused, but moving onward.

    thanks again for your help and encouragement, phil

    shared my sofa with more than a few surfers from NZ. nice folks all.

  23. #23
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    phil,

    Frustrated, eh? It DOES get easier!

    Actually, I'd learned a LOT from Kevin's first edition so I recommend that you go back and read, take notes, then retry.

    Okay, my comment about the docs directory is based on the simple fact that it's supposed to be for APACHE documentation (or so I must presume). The htdocs directory is where the default "webspace" is located. It's only by changing settings within the httpd.conf file that you can change this and the most common way is to uncomment the httpd-vhosts.conf file's include statement and CREATE a VirtualHost on your test server. For example, in my httpd-vhosts.conf file, I have (for example - there are 20+ of these!):
    Code:
    NameVirtualHost 127.0.0.1:80
    
    <VirtualHost 127.0.0.1:80>
    ServerName arj
    DocumentRoot W:/ARJ
    ServerPath W:/ARJ
    </VirtualHost>
    ... for one of my clients's sites replicated on my test server.

    THEN, in the C:\Windows\system32\drivers\etc\hosts file, I have:
    Code:
    127.0.0.1 arj
    All I need to do to access the arj "localhost domain" is type arj/ in my browser's location box and up it pops!

    Another book on Apache? I'd say not. It's a "simple" tool that you really don't need to get into to use effectively. IMHO, Kevin laid it out (although I needed to make notes because it wasn't {originally?} laid out in a 1, 2, 3 manner - albeit close) so you don't need to do any more (except, of course, enable mod_rewrite which I find to be an invaluable tool - but look to my signature's tutorial when you get that far).

    Please DON'T give up! Apache is a wonderful tool and any combination with PHP and MySQL works a treat!

    Just keep asking questions and we'll get you where you want to be!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  24. #24
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when you say "partition", do you mean just a different directory on your C: drive?

    can i put my site anywhere and edit the "documentroot" path to point to that directory?

    can i add additonal virtual hosts just by naming them and pointing to them with the directoryroot path?

    thanks, phil

  25. #25
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Phil,

    A partition is another drive letter on the same physical disk drive. I discovered the hard way that Apache 1.x didn't like it on another drive (C:\SomewhereElse was fine).

    I have no experience moving the default localhost location from htdocs but I'd think that it's a mere edit of the httpd.conf file.

    VirtualHosts? CERTAINLY! I gave you the example(s) from my httpd-vhosts.conf and hosts file - and they work great!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


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
  •