Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th June 2013, 11:07
hitri hitri is offline
Member
 
Join Date: Jun 2010
Posts: 33
Thanks: 2
Thanked 4 Times in 4 Posts
Default Ispconfig 3 + nginx + prestashop rewrite = 500 Internal Server Error

I'm using Ubuntu server 12.04LTS, nginx web server with Ispconfig 3 (The perfect server installation). I have installed Prestashop and when I turn on the rewrite function I got '500 Internal Server Error' (URL looks ok). I was looking for solution on all forums nothing works for me. Nginx looks like nightmare.

Last edited by hitri; 18th June 2013 at 14:06.
Reply With Quote
Sponsored Links
  #2  
Old 19th June 2013, 11:25
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
Default

Is there anything in the log files (access.log, error.log or php-fpm.log?)

I've found with nginx, to get rewrite stuff working, you tend to have to set some nginx directives.

You may have already seen this, but I'll post it just in case:
http://www.howtoforge.com/running-pr...y-ubuntu-12.10
Reply With Quote
  #3  
Old 19th June 2013, 11:36
hitri hitri is offline
Member
 
Join Date: Jun 2010
Posts: 33
Thanks: 2
Thanked 4 Times in 4 Posts
Default

I've seen this set up. It is not useful for Ispconfig configuration. I used only those nginx rewritw directives.
Reply With Quote
  #4  
Old 19th June 2013, 11:46
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
Default

Okay. Is there anything in your log files?

The part which handles the redirects in that guide is:

Code:
try_files $uri $uri/ /index.php$is_args$args;
Make sure you set the directives through nginx (see example here http://www.howtoforge.com/forums/sho...14&postcount=4) and not by modifying the vhosts file as ISPConfig will overwrite it.
Reply With Quote
  #5  
Old 19th June 2013, 15:05
hitri hitri is offline
Member
 
Join Date: Jun 2010
Posts: 33
Thanks: 2
Thanked 4 Times in 4 Posts
Default

Thank you ItsDom.

You are right, ispconfig rewrite directives in vhost configurations.

Now it works, but images are not visible
Reply With Quote
  #6  
Old 19th June 2013, 16:09
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
Default

No worries.

Looking at the nginx directive from the tutorial, I'm guessing the bit to handle images is:

Code:
       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-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2$3.jpg last;
       rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last;
       rewrite ^/images_ie/?([^/]+)\.(jpe?g|png|gif)$ /js/jquery/plugins/fancybox/images/$1.$2 last;
I could be wrong though - give it a try.

If other bits still don't work, e.g. the API, have a look through the nginx directives given in the tutorial and transplant the bits you need into the "nginx directives" box in site options in ISPConfig.

I'm not sure if the stuff above needs to go into a location container. I imagine not. Try it outside of the location container and if it throws up some errors, then put it in with the index directive.
Reply With Quote
The Following User Says Thank You to ItsDom For This Useful Post:
hitri (3rd July 2013)
  #7  
Old 19th June 2013, 17:14
hitri hitri is offline
Member
 
Join Date: Jun 2010
Posts: 33
Thanks: 2
Thanked 4 Times in 4 Posts
 
Default

ItsDom thank you very much, it works now
Reply With Quote
Reply

Bookmarks

Tags
ispconfig 3, nginx, prestashop, rewrite, ubuntu

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3 system installation script Mark_NL Tips/Tricks/Mods 14 18th November 2014 07:34
ISPConfig3 mail doesn't work pehden Installation/Configuration 20 9th December 2013 15:05
Please help convert htaccess to nginx ababneh HOWTO-Related Questions 6 5th April 2013 01:19
Ftp problems timeout reny2000 General 6 23rd December 2009 12:09
Installation Fails... :( cyberstorm Installation/Configuration 1 15th January 2006 19:07


All times are GMT +2. The time now is 03:51.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.