logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Greener than green newbie..localhost not working - RESOLVED!
Author
dotolee



Joined: 28 Apr 2008
Posts: 5

PostPosted: Fri 02 May '08 19:35    Post subject: Greener than green newbie..localhost not working - RESOLVED! Reply with quote

So i started to follow some step by step configuration tutorial online and i managed to mess things up.
now when i navigate to "http://localhost" it doesn't display my treasured "it works" message. (so sad)
The error message I'm getting is that I'm not authorized to view the page. As a test, i tried using 127.0.0.1 instead but I get the same message.

When I run httpd.exe, this is the output i get:

C:\Program Files\Apache Software Foundation\Apache2.2\bin>httpd
Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.phub.net.cable.rogers.com] does not exist
Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.phub.net.cable.rogers.com] does not exist
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Wed Apr 30 08:52:43 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Wed Apr 30 08:52:43 2008] [warn] NameVirtualHost *:80 has no VirtualHosts
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0
:80
no listening sockets available, shutting down
Unable to open logs

When I initially installed apache, it detected my ISP provider (rogers) and my IP settings etc and I just accepted all defaults. I don't really need to connect directly from my box to the LIVE production URL ...
I just need localhost to work.
What I'm trying to accomplish is the following:
create a development environment on my box where i can create HTML / PHP files with server side includes. Once the site is working, i will manually copy the files over to a server that has already been set up for me by the IT folks in the office.
Thanks for the help Very Happy


Last edited by dotolee on Fri 02 May '08 21:33; edited 1 time in total
Back to top
dotolee



Joined: 28 Apr 2008
Posts: 5

PostPosted: Fri 02 May '08 21:03    Post subject: Got it working again... Reply with quote

by just copying the original .conf file back. But I have a few questions. Please bear with me if they sound silly:
1. my ISP changes my IP address now and then. I'd like to be able to use apache to render my web pages regardless of whether or not I'm online/offline. Is this possible?
2. If not, should i always check "ipconfig", get my latest IP and or DNS name and put it somewhere in the .conf files?
3. Finally, i've added a folder on my c drive called "webprojects". I'd like to start creating my php/html files in this location, under various project names. I've added the following entry again into my conf file:
<Directory "c:/webprojects/*/">
AllowOverride None
AddType text/html .shtml
AddHandler server-parsed .shtml
Options FollowSymLinks +Includes
Order allow,deny
Allow from all
AddOutputFilter INCLUDES;DEFLATE shtml
</Directory>

As a test, I've created c:\webprojects\test\index.html and inside, I just have a "hello world".
how do i reference this in the browser?
I've tried localhost/test but that didn't work.

Thanks.
Back to top
dotolee



Joined: 28 Apr 2008
Posts: 5

PostPosted: Fri 02 May '08 21:24    Post subject: is this the right answer for question 3? Reply with quote

I edited my httpd-vhosts.conf file with the following entry:
<VirtualHost *>
ServerName test.ca
ServerAdmin webmaster@test.ca
DocumentRoot "C:/webprojects/test"
ServerAlias www.test.ca creido.dnsalias.com
ErrorLog logs/creido.com-error_log
CustomLog logs/creido.com-access)log combined
AddHandler server-parsed .shtml
Options FollowSymLinks +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</VirtualHost>

and now the default index.html that's being picked up is the one under my c:\webprojects\test folder. For each project do i just add a new entry in the same fashion? does everything need to stem off of c:/website/test for it to work, or can these folders theoretically live anywhere on my drive?
Many thanks
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Fri 02 May '08 21:49    Post subject: Reply with quote

The documentroot can anywhere on your box, eg:

DocumentRoot "d:/zzzz/yyy"

You can also organize you projects like for example:

"C:/webprojects/test/projec1"
"C:/webprojects/test/projec2"
etc.

You call then with: http://...../project1
etc.

Steffen

Btw a tip:
Better not to use in the subject -Greener than green newbie- , does not help to get an answer. Also you have quite some questions above posts, advised is to post a short question for each issue you have. See also the Forum rules for other tips.
Back to top


Reply to topic   Topic: Greener than green newbie..localhost not working - RESOLVED! View previous topic :: View next topic
Post new topic   Forum Index -> Apache