Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Maybe more an an apache issue but who knows


spieh

Recommended Posts

Posted

After downloading and compliling the source code I have apache2 with php modssl etc running on my personal PC and mySQL db server running in the background. My PC is setup behind a standard RCA router as well.

 

So when I use the ../includes/configure.php to set the name of the server and the db server I set the servername to localhost. WHen I put in localhost on my browser it loads the storefront perfectly so its much easier to test this way instead of paying an webhoster and uploading file changes etc.

 

I want to show my client my progress on the site but I can't have them view the store because since configure.php is set to localhost on the servername it shows all broken links etc.

 

easy fix right? Just change the servername to my routers external IP address so when osCommerce generates the html it links them to my router instead of localhost where they will be able to view everything just fine. This works but it has a major drawback:

 

IF i dial-up to a phone modem and view my external IP address it loads slowy but it works because its actually serving the data to the dial-up ISP and then the ISP serves it back to me. When I disco the phone modem and am back on my router's connection I put in my external IP address from my own pc into the web browser and the browser will not load the page it cannot find it. There must be some issue with loopback I am not knowledgeable enough about the routing tables to know why. It seems like the only way I'll be able to server myself the data is through the localhost or internal IP path by changing the configure.php servername back to localhost and disabling public viewing again.

 

Any reccomendations?

 

-Dave

Posted

In your local hosts file add the same name as the public name for your router, then use this name in the osC config file.

 

If your routers public name resolves to say

 

router234.domain.com

 

add this behind the localhost setting in your host file so that it reads

 

127.0.0.1 localhost router234.domain.com

 

then use router234.domain.com in your osC config file

while (!succeed) {try()};

 

GMT -6:00

Posted
In your local hosts file add the same name as the public name for your router, then use this name in the osC config file.

 

If your routers public name resolves to say

 

router234.domain.com

 

add this behind the localhost setting in your host file so that it reads

 

127.0.0.1 localhost router234.domain.com

 

then use router234.domain.com in your osC config file

 

My router does not have a domain name associated with its IP. It's just an IP address my ISP allocates to its MAC address.

 

So when I try and put in my hosts file:

 

127.0.0.1 localhost <my router's IP address>

 

It doesn't seem to fix anything. Do I need a domain name for this to be a valid solution?

Posted

If you go to a command prompt an type

 

nslookup <my router's IP address>

 

does this give an answer?

while (!succeed) {try()};

 

GMT -6:00

Posted
If you go to a command prompt an type

 

nslookup <my router's IP address>

 

does this give an answer?

 

When I try to do NSlookup on my IP address I get this:

 

Microsoft Windows XP [Version 5.1.2600]

© Copyright 1985-2001 Microsoft Corp.

 

C:\>nslookup <router's IP address>

Server: chadmin

Address: 192.168.0.1

 

*** chadmin can't find <router's ip address>: Non-existent domain

 

C:\>

Posted

your router is most likely at 192.168.1.1

 

When I try to do NSlookup on my IP address I get this:

 

Microsoft Windows XP [Version 5.1.2600]

? Copyright 1985-2001 Microsoft Corp.

 

C:\>nslookup <router's IP address>

Server:  chadmin

Address:  192.168.0.1

 

*** chadmin can't find <router's ip address>: Non-existent domain

 

C:\>

Posted
your router is most likely at 192.168.1.1

 

I know where my router's gateway is on the RCA routers its 192.168.0.1 each MFG has a slightly different gateway which you can find your gateway with the ipconfig /all switch from a cmd prompt.

 

the settings in my router allow me to disable the firewall protection which I don't believe has anything to do with this at all.

 

basically I'm running a webserver on my PC and I want to be able to access the webserver from the same machine its running on without going through localhost. I am trying to force my pc to act as if its a remote host if that makes more sense.

Posted
I am trying to force my pc to act as if its a remote host if that makes more sense.

 

Nope! Doesn't!

 

The only point in this would be if you wanted to access your localhost website from a remote location. To do this in the simplest way (if you have a modern version of Windows installed) would be to enable Remote Desktop Assistance. From a security point of view I think anyone who wants to set up remote access to their home computer (for whatever reason) to be running very serious security risks.

 

If you need to show potential customers a working 'localhost' version of thw website then I do it via Laptop.

 

I also think you are wrong in dismissing the routers hardware firewall as a potential problem, especially as you can get it to work via normal modem.

 

Vger

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...