Jump to content

Installing server error


Recommended Posts

Hello!

 

I have followed those tutorials but i dont get it to work !

http://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3

http://www.howtoforge.com/the-perfect-server-ubuntu-14.04-nginx-bind-mysql-php-postfix-dovecot-and-ispconfig3

 

The installation of server works fine. Also copy the files and db goes well !

 

But when i tries to access it with the apache server nothing works! I cant access the site and I cant access the admin panel !

When i tries with nginx the shop works (if i turn off friendly URL, but i want to use friendly URL).

 

When it doesnt work i get error code 500

 

I think it has something to do with url rewrites. But i cant find any that works for me!

Does anyone know what I need to do to make it work ? I can use either apache or nginx !

 

 

Important:

I use more than one language

Prestashop version 1.6.0.11

Link to comment
Share on other sites

Hello :)

 

Can you activate mode debug ?

 

Edit config/defines.inc.php and change variable

 

from :

define('_PS_MODE_DEV_', false);

to

define('_PS_MODE_DEV_', true);


For url rewriting and nginx :

 

 

You have to modifiy your nginx configuration, on your server block add thoses lines 

  #Specify a charset
    charset utf-8;

    rewrite ^/([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$1$2$3.jpg last;
    rewrite ^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last;
    rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last;

    rewrite ^/c/([0-9]+)(-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*.jpg$ /img/c/$1$2.jpg last;
    rewrite ^/c/([a-zA-Z-]+)/[a-zA-Z0-9-]+.jpg$ /img/c/$1.jpg last;
    rewrite ^/([0-9]+)(-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*.jpg$ /img/c/$1$2.jpg last;


    rewrite ^/order$ /index.php?controller=order last;
    if (!-e $request_filename){
        rewrite ^(.*)$ /index.php last;
    }

and 

sudo service nginx reload

To load new nginx config.

  • Like 1
Link to comment
Share on other sites

Great news :)

 

Yes on nginx.conf its all your global settings,

and etc/nginx/sites-available/yourwebsite is you specials website settings :)

 

IPSconfig works fine ? I ll probably install it on my server :)

if you want speed up, try pagespeed module for nginx (You have to recompile it) but its just totally awesome ;-)

 

  • Like 1
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...