Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: I can access a folder locally, but I can't access it remote |
|
Author |
|
rik13
Joined: 19 Jun 2011 Posts: 2
|
Posted: Sun 19 Jun '11 0:29 Post subject: I can access a folder locally, but I can't access it remote |
|
|
Hello all,
I have spent so much time on this trying to fix it but after 5 hours I have to admit defeat and look for expert advice. I'm sure it's something really simple and I hope one of you can show me where the problem is.
At the moment I am just wanting to set up my PC as a remote server to test access, but eventually want to host my website from home as the machine is on 24/7 anyway.
I can access a folder locally, but I can't access it remotely.
I am using 2.2.19 win32 binary openSSL version. My OS is XP Pro.
Here is my config page:
Moderators note:
The rules here under that "Forum Rules" link to the left state not to dump your entire config on here. We've all read every #comment line in the config file at least once
Code: |
#
ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2"
#Listen
Listen 8080
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:\Documents and Settings\RK\My Documents\Web"
#
<Directory "C:\Documents and Settings\RK\My Documents\Web">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
|
Here is my error log:
Pruning as well:
Code: |
[Sat Jun 18 20:58:44 2011] [error] [client 127.0.0.1] File does not exist: C:/Documents and Settings/RK/My Documents/Web/favicon.ico, referer: http://localhost:8080/
Similar over and over
|
From doing a lot of internet reading of the problem it seems to be a port conflict problem(?).
I did a netstat -a -o in cmd screen to check for a conflict but I'm not seeing anything else on that port(?) :
My router is a Thomson TG585v7 and I have configured HTTP Web Server under "games, applications and sharing" menu for TCP and UDP to both forward port 8080 to 80.
I'd be very grateful for any help.
Thanks for your time.
Rgds. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sun 19 Jun '11 1:57 Post subject: Re: Small server config issue, can anyone see the problem? |
|
|
rik13 wrote: |
Code: |
[Sat Jun 18 20:58:44 2011] [error] [client 127.0.0.1] File does not exist: C:/Documents and Settings/RK/My Documents/Web/favicon.ico, referer: http://localhost:8080/
Similar over and over
|
From doing a lot of internet reading of the problem it seems to be a port conflict problem(?).
|
Not at all, duplicate socket errors are a port conflict.
First, did you read anything ... in all those lines with the # signs in front it clearly states use forward slashes, I have cut them out here but you can look at your config.
But let me show you;
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
# If a drive letter is omitted, the drive on which httpd.exe is located
# will be used by default. It is recommended that you always supply
# an explicit drive letter in absolute paths to avoid confusion.
So, your DocumentRoot should be
"C:/Documents and Settings/RK/My Documents/Web"
Interestingly, Apache seems to be getting it right anyway looking at the error.
I think the problem is Apache is running as a service, under the default system user. If you changed it to run as user RK, it would be able to gain access to RK's My Documents folder. These folders are protected from other users except Administrators.
You can change the user the service runs as from the Services window in Administrator Tools which can be found in Control Panel. Find the service named Apache2.2, highlight it, right click and choose properties. See the "Log On" tab, choose "This Account" and fill in RK's username and password. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sun 19 Jun '11 2:09 Post subject: |
|
|
Thinking about it more .. I am going to assume RK is an administrative user, probably not a good idea running it as RK, but you will have to do so to access files in RK's My documents folder.
A big problem with Apache installed in the Program Files folder comes when using system restore, so that hurts putting them in Apache's htdocs folder should you have to use system restore some day.
Most people create a folder in their C drive and call it something, and tree off from there. This alleviates most problems one can run into on various fronts. So for example, create a folder named www in the C Drive
c:\www
you can then put more in there to separate multiple sites
c:\www\site1
c:\www\site2
The the DocumentRoots for these would be
DocumentRoot "C:/www/site1"
DocumentRoot "C:/www/site2"
etc etc
I hope you catch my meaning here |
|
Back to top |
|
rik13
Joined: 19 Jun 2011 Posts: 2
|
Posted: Sun 19 Jun '11 14:47 Post subject: |
|
|
GLSmith, thanks for your time and help. I actually never noticed that the slashes were the other way round! I will fix that and also follow your other instructions when I next have some time to look at it and I'll let you know how it goes.
Thansk a lot.
Rgds. |
|
Back to top |
|
|
|
|
|
|