Jump to content

Unable to access shop outside localhost but admin area is accessible


Recommended Posts

Hi,

I have successfully installed prestashop and its running just fine. I have a strange problem.

 

I am ABLE to access admin from any other computer on LAN aswell as from outside the home network but I am unable to access the actual shop. It always gets redirected to localhost

 

if I try from another computer at home the following url:

http://192.168.0.195/prestashop/

or

http://dyndnsURL.com/prestashop/

I see its doing "connecting localhost..." and replacing the URL with http://localhost/prestashop/

 

but if I do

http://192.168.0.195/prestashop/admin123

http://dyndnsURL.com/prestashop/admin123

its working fine!

 

Any ideas? Its a fresh ubuntu/LAMP install.

 

Thanks

Link to comment
Share on other sites

Hi I am having the same problem except I want to transfer my local installation of Presta to remote server, and yet, after moving files, db, editing settings.inc.php, etc.. It is still redirecting me to localhost/.

 

I would very much appreciate some help with this.

Link to comment
Share on other sites

  • 2 months later...

Until PS developers move qualified url's out of the database, these sorts of problems will continue. I hope this fixes your problem. It works for me. Cheers

 

Moving an installed prestashop from localhost to a remote server. PrestaShop 1.4.5.1 running on local and remote host, apche 2, php 5.3.8.

 

Note: These instructions are for a subdomain. Just remove the subdomain from the instructions and it will work fine for domains.

 

see this: http://www.addons-mo...ps_shop_domain/

 

Changed the following fields in the new remote mysql db table yourprefix_configuration:

PS_SHOP_DOMAIN alpha.mywebsite.com.co

PS_SHOP_DOMAIN_SSL alpha.mywebsite.com.co

  • Uploaded site files to subdomain/domain root
  • Exported shop localhost database, created remote server database and imported the localhost sql
  • Updated the /config/settings.inc.php as follows

· From: (running localhost)

 

· define('_DB_SERVER_', 'localhost');

· define('_DB_TYPE_', 'MySQL');

· define('_DB_NAME_', 'prestashop141alpha');

· define('_DB_USER_', 'root');

· define('_DB_PASSWD_', ‘mypassword’);

· define('_DB_PREFIX_', 'alpha_');

· define('_MYSQL_ENGINE_', 'InnoDB');

· define('__PS_BASE_URI__', '/prestashop141alpha/');

To: (running remote) subdomain alpha.mydomain.com.co

· define('_DB_SERVER_', 'localhost');

· define('_DB_TYPE_', 'MySQL');

· define('_DB_NAME_', 'alpha');

· define('_DB_USER_', 'alpha');

· define('_DB_PASSWD_', ‘mypassword’);

· define('_DB_PREFIX_', 'alpha_');

· define('_MYSQL_ENGINE_', 'InnoDB');

· define('__PS_BASE_URI__', '/');

 

Resulted in:

Back Office – will not accept my password. Reset the pwd : See http://nickbartlett....-in-prestashop/

 

This site is working both on the back and front sides.

 

NOTE(s)

MAKE SURE TO CLEAR YOUR BROWSER COOKIES WHEN TESTING!

I already have prestashop sites on my remote server so I know that the necessary modules are loaded.

If you’re like me and you tried the “lost password” link on prestashop’s backend and never received the email, you might try this solution if you have access to the database. Look in config/settings.inc.php for the _COOKIE_KEY_ value as you’ll need that. Run the following SQL and replace the <> variables with your information.

UPDATE employee SET passwd = md5(“<_COOKIE_KEY_ value><yourNewPassword>”) WHERE email = “youremailaddress”;

UPDATE alpha_employee SET passwd = md5('WrQH8SFEeD9od7T43qSQDxLHPVsTGPnB63nYhUF6NOSDd7NjmyZuxkpxjefe7138') WHERE email = '[email protected]'

 

Most PrestaShop owners or potential owners do not realize a small change in PrestaShop 1.4. The domain name or the hostnbame now is saved in database ps_configuration table.

So if you are going move you store domain, please be caution of this changes.

In following cases, you will need to manually change the data saved in ps_configuration table.

1. If you setup your store locally, then move to real hosting site by backup and restore method.

2. If you are going to move your store domain from one to another in the same hosting server, but keep the database not changed.

3. if you are going to move your store to complete different server or hosting company.

If you do not change domain name, when you access your new domain of your website, it will always be redirect to old domain website.

Please following this to change your domain name

1. Use database admin tool like PhpMyAdmin (from your site control panel)

2. Locate table ps_configuration

3. Look for records with following name (by default they ID is 155/156)

* PS_SHOP_DOMAIN

* PS_SHOP_DOMAIN_SSL

4. Change the domain name to your new domain.

Please note: domain means domain name only, should not include the path.

for example, if your store URL is http://abcde.com/shop/, then only input “abcde.com”

the sub-folder should be defined in file /config/setting.inc.php of you store.

After moving all of your product images, for best performance go to the product preferences taband set "Use the legacy image filesystem" option to "NoAfter moving all of your product images, for best performance go to the product preferences taband set "Use the legacy image filesystem" option to "No

Link to comment
Share on other sites

  • 2 months later...

Hi,

I have successfully installed prestashop and its running just fine. I have a strange problem.

 

I am ABLE to access admin from any other computer on LAN aswell as from outside the home network but I am unable to access the actual shop. It always gets redirected to localhost

 

if I try from another computer at home the following url:

http://192.168.0.195/prestashop/

or

http://dyndnsURL.com/prestashop/

I see its doing "connecting localhost..." and replacing the URL with http://localhost/prestashop/

 

but if I do

http://192.168.0.195...tashop/admin123

http://dyndnsURL.com...tashop/admin123

its working fine!

 

Any ideas? Its a fresh ubuntu/LAMP install.

 

Thanks

Link to comment
Share on other sites

  • 1 month later...
  • 8 years later...

This is how you solve this problem,  you need to change your server in prestashop admistrator. This methodo works in wamp for windows, but it should work with Linux, centos and others OS outthere 

First you need to modify your domain and your ssl domain to the ip address of your compurter which is assigned dinamically by the router in the network.

let's say the ip address assigned to your computer by the router is 10.0.0.2x and your router ip address is 14x.3x.5x 9x this numbers are just examples x is any number.

you need to put the first numbers likes this:  Shop domain: could be localhost:port# or 10.0.0.2x this is for you LAN connection, that means your office or your private network.

SSL domain: could be localhost:port# or 10.0.0.2x same as above  

This number could be for  your remote access from outside your network 14x.3x.5x 9x dont need to put local host if using this numbers. 

This will work, I have try 200 different ways. I have tried all possible connections. This method will work with any device local or remote. 

To every in this forum who are giving the wrong advise, this is how you access prestashop without a domain server hosting. I am a technology specialist. This takes less than 10 minutes to setup. Hope this will relieve most people looking for a definite answer to this error. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...