PDA

View Full Version : Apache Web Server through Lectron Router



tony_young480
13-07-2006, 11:33 AM
Hi.
I want to set up a web server from my IP, but when I access my external IP, I get the router administration interface, the same thing I get when I access my gateway. Is there a way for me to set it up so all requests to that IP get rerouted to my local IP address, which has Apache, PHP, MySQL, etc. installed on it? I am running Windows XP, not any form of Linux ex. coLinux, if this matters.

Graham L
13-07-2006, 01:47 PM
By "local IP address" I assume you mean the local non-routable addrerss 192.168.x.y or 10.x.y.z .

However.I'm still not totally sure what you are trying to do. :(

If you are trying to access your Apache server at the external IP address from inside your LAN, which is "under" that IP address (especially if from the machine running your servers) it's likely (or guaranteed) to not work. It's a very basic security measure. You would need to test it from an external machine. You should be able to access the server at 127.0.0.1 on the same machine, or at its local IP address from any machine on the local network.

vinref
13-07-2006, 11:13 PM
Hi.
I want to set up a web server from my IP, but when I access my external IP, I get the router administration interface, the same thing I get when I access my gateway. Is there a way for me to set it up so all requests to that IP get rerouted to my local IP address, which has Apache, PHP, MySQL, etc. installed on it? I am running Windows XP, not any form of Linux ex. coLinux, if this matters.

You have set up Apache, MySQL and PHP on the same machine you are using the browser to access the webpages?

If so, then you should make sure you edit the Apache config file - httpd.conf. Look for the directive ServerName and change it so that it reads ServerName=127.0.0.1. The 127.0.0.1 address is the address by which your machine knows itself. Restart Apache so that it will load the edited file.

You then view the webpages by pointing your browser to http://127.0.0.1 (or http://localhost) when Apache is running.

You should also test whether PHP is configured properly by going to 127.0.0.1/test.php. If it prints out a PHP page full of info, it is working properly. If you get an "Access denied username@localhost" blah blah blah error, MySQL is not set up correctly. Reply if you get stuck.

tony_young480
14-07-2006, 12:09 PM
I'm not attempting to run a local web server. I want all requests to my external IP (222.153.x.x) rerouted to my internal IP (10.0.0.8). Is this possible?

Graham L
14-07-2006, 02:31 PM
If some one accesses your external IP address (the only one they can see from the outside), the router/NAT will cause HTTP requests for the Apache server (at the external IP) to be directed to the 10.x.y.z of the server.

That is what you want.

But difficulties arise if you want to use the external address from the inside. With good reason, a packet arriving at an Internet IP address with the same IP address as the source address is assumed to be an attack.

To browse the web site you will have to do it from another LAn, or by using the internal address.

tony_young480
14-07-2006, 03:03 PM
If some one accesses your external IP address (the only one they can see from the outside), the router/NAT will cause HTTP requests for the Apache server (at the external IP) to be directed to the 10.x.y.z of the server.

That is what you want.

But difficulties arise if you want to use the external address from the inside. With good reason, a packet arriving at an Internet IP address with the same IP address as the source address is assumed to be an attack.

To browse the web site you will have to do it from another LAn, or by using the internal address.
Yes, I know, but as I said before, if I access by external IP address from another LAN, all I get is the Conexant - Hasbani router administration panel.

Graham L
14-07-2006, 04:11 PM
Is this "other LAN" on the same side of the same router?

If it is, I suppose the router assumes that someone wants to configure it. ;)(And the internal 10.x.y.z address is still the one to use. Your LANs don't need and shouldn't go out to the real Internet for information on the local internet.)

If it's not, there's something seriously wrong with the security settings of the router. I wouldn't be too keen on being able to configure it from the Internet.


... but as I said before, I'm still not totally sure what you are doing. You didn't say
... if I access by external IP address from another LAN, ... here. ;)

tony_young480
14-07-2006, 05:08 PM
Is this "other LAN" on the same side of the same router?

If it is, I suppose the router assumes that someone wants to configure it. ;)(And the internal 10.x.y.z address is still the one to use. Your LANs don't need and shouldn't go out to the real Internet for information on the local internet.)

If it's not, there's something seriously wrong with the security settings of the router. I wouldn't be too keen on being able to configure it from the Internet.

I'm still not totally sure what you are doing. You didn't say here. ;)
Check my first post.

Graham L
14-07-2006, 05:30 PM
I did. Several times, making strenuous efforts to understand what you are doing.

You didn't say where you were trying from. You still haven't.

Vinref and I made the same assumption, because this is a common "problem". I suspect you have a variant of it, but I don't know, because you haven't answered a clear question.

I'm sorry, but my ESP is not so developed that I have total omniscience. Some actual information would have been a great help.

Jen
14-07-2006, 07:48 PM
I'm not attempting to run a local web server.
Is there a way for me to set it up so all requests to that IP get rerouted to my local IP address, which has Apache, PHP, MySQL, etc. installed on it?Hmm ... I'm rather confused too. If you have Apache running then you are running a local web server.

You want to route the traffic so that when they put in your external IP they end up on your webpage served by Apache that you are running and not at the router admin interface? Have you port forwarded the router so that requests to port 80 end up at your 10.0.0.8 address?

vinref
14-07-2006, 09:33 PM
I'm not attempting to run a local web server. I want all requests to my external IP (222.153.x.x) rerouted to my internal IP (10.0.0.8). Is this possible?

Yes. Set the router to bridge mode.

tony_young480
16-07-2006, 06:53 PM
Whoops! I made a mistake in that post. I meant to say "I'm attempting to run a local web host". This is the easiest explanation I can think of:

I want to turn my computer into an everyone can visit website.

Hopefully this will clarify things for you.

robsonde
16-07-2006, 07:54 PM
Whoops! I made a mistake in that post. I meant to say "I'm attempting to run a local web host". This is the easiest explanation I can think of:

I want to turn my computer into an everyone can visit website.

Hopefully this will clarify things for you.

often even when yoiu have prto fowarding set up right you still get the routeradmin screen if you try it from INSIDE your network.

get it checked from outside, try a php-web-proxy

CorbinH
16-07-2006, 08:23 PM
Enable port forwarding with the port 80 to your LAN IP and like robsonde said, try using a proxy to view your WAN IP. If you still get your router config page make sure you have remote configuration disabled for your router. Once you know for sure your router is correctly configured if you have your site registered with a DNS name you can add a line like

127.0.0.1 yoursite.com

to c:\windows\system32\drivers\etc\hosts
so you can view the site from the same URL as your visitors but it will still display your page correctly.

tony_young480
16-07-2006, 09:48 PM
Yay! It worked! Port Forwarding was called Virtual Server for some reason. Thanks!