Raxox Posted March 10, 2015 Share Posted March 10, 2015 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 More sharing options...
Foovince Posted March 10, 2015 Share Posted March 10, 2015 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. 1 Link to comment Share on other sites More sharing options...
Raxox Posted March 10, 2015 Author Share Posted March 10, 2015 (edited) Thank you! Do you know where i find my nginx configuration file ? And is it just to at those line somewhere in that file ? Edited March 10, 2015 by Snus24 (see edit history) Link to comment Share on other sites More sharing options...
Foovince Posted March 10, 2015 Share Posted March 10, 2015 Yes, normally is on /etc/nginx/nginx.conf or /etc/nginx/sites-available/yourwebsite, in server { } block Do you get more infos with mode debug in your blank page ? 1 Link to comment Share on other sites More sharing options...
Raxox Posted March 10, 2015 Author Share Posted March 10, 2015 (edited) now i get 404 not found ! no other error text shall the server { ... } block be inside of another block ? existing block is event { }, http { } and a commented mail { } Edited March 10, 2015 by Snus24 (see edit history) Link to comment Share on other sites More sharing options...
Foovince Posted March 10, 2015 Share Posted March 10, 2015 You should rite lines on you server { } block where you have your server_name www.yourwebsite.com 1 Link to comment Share on other sites More sharing options...
Raxox Posted March 10, 2015 Author Share Posted March 10, 2015 (edited) Thank you very much. Now its work =) i made changes to /etc/nginx/nginx.conf, but there was no server block there but when i changed in /etc/nginx/sites-available/yourwebsite it worked ! Thank you again ! Edited March 10, 2015 by Snus24 (see edit history) Link to comment Share on other sites More sharing options...
Foovince Posted March 10, 2015 Share Posted March 10, 2015 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 ;-) 1 Link to comment Share on other sites More sharing options...
Raxox Posted March 10, 2015 Author Share Posted March 10, 2015 I really like ISPconfig si I recommend it. I will check at that module ! Link to comment Share on other sites More sharing options...
Raxox Posted March 12, 2015 Author Share Posted March 12, 2015 Do i need one more rewrite for Google analytics ? I get the error below when i try to add analytics ! "The redirect URI in the request: http://domain.com/modules/gapi/oauth2callback.php did not match a registered redirect URI." Link to comment Share on other sites More sharing options...
Foovince Posted March 12, 2015 Share Posted March 12, 2015 Hmm... not sure to understand.. For google analytics normally you have just to save your google code number in the module ... ? Where do you get this error ? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now