Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Elkef

macrumors newbie
Original poster
Mar 12, 2005
11
0
Belgium
Greetings,
As this is my first post, I could be posting into the wrong category. Anyway, I have the following problem.

I wrote a php application. It runs fine on 127.0.0.1/ But I noticed that my mac translates 127.0.0.1 in G5.local

Now ofcourse my router does not know this name and so if I try to access my webapplication from another computer it does not work. So in /etc/httpd/httpd.conf I changed my servername to my IP address. When I do this on my linux box this problem is solved. Unfortunately it is not on my mac.

Now here comes the problem.
I can access the root directory, but cannot access any other directory.

Does anybody knows what is going on?
 

whocares

macrumors 65816
Oct 9, 2002
1,494
0
:noitаɔo˩
The problem is that the HTTP requests aren't routed to your computer. You need to set up your router to forward all HTTP requests (port 80) to your computer's IP address. This is done through the router's setup.

You can normally access your router's setup panes via http://192.168.1.1/


What router to you have?
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
If you want to listen on more than one IP, you should adjust your Listen directive accordingly. The ServerName will just add headers to the response.

As for the ability to access the document root only, I would suggest you double check that you have a Directory directive with the same path as the DocumentRoot and that you double check the permissions on the folders within the document root. They should have execute permissions, otherwise you will see permission denied (403) errors.
 

Elkef

macrumors newbie
Original poster
Mar 12, 2005
11
0
Belgium
Thanks guys

Greetings...

whocares,

My router is a Dlink DI-704P. But I do not think it is that, cause my linux server does it all perfectly well.

Unfortunately at first sight my router can only manage rules for incomming and outgoing traffic and nothing for the internal routing stuff, so I cannot try it.
What I might do is configure my linux as a router and see what traffic is going on...

Thanks for the hint. I will check that out, but I am not convinced it is this..



kingjr3

Now as for the access privileges on the documentroot, they are all fine.
I changed the owner into www Which is according to httpd.conf the user who runs apache.

And Still no result, also I do get a 404 and nothing else.

Any ideas cause I am really not seeing it...
 

Elkef

macrumors newbie
Original poster
Mar 12, 2005
11
0
Belgium
I am sorry

Hello again. It was my own stupid mistake.
The routing went wrong through the airport. When I connected my computer through LAN everything worked fine.

Now I know what is wrong I will figure it out. Thank you very much!!!

It was a good hint to check the router thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.