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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th February 2012, 22:49
Kozley Kozley is offline
Member
 
Join Date: Mar 2011
Location: Örebro, Sweden
Posts: 41
Thanks: 4
Thanked 1 Time in 1 Post
Default Joomla 2.5 on Nginx

Hi!

I followed tutorial from http://www.howtoforge.com/perfect-se...nx-ispconfig-3, but using Debian Wheezy. It works perfect without any problem. I tried to create an nginx vhost configuration from tutorial http://www.howtoforge.com/running-jo...e-ubuntu-11.10, I can access joomla administration but not frontend site and it give me error 503. How do I know right vhost configuration?

Last edited by Kozley; 27th February 2012 at 22:55.
Reply With Quote
Sponsored Links
  #2  
Old 28th February 2012, 18:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

This is what I've added to the nginx Directives field on the Options tab in ISPConfig:

Code:
       # deny running scripts inside writable directories
       location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
                return 403;
                error_page 403 /403_error.html;
       }

       location / {
                try_files $uri $uri/ /index.php?q=$uri&$args;
       }

       # caching of files
       location ~* \.(ico|pdf|flv)$ {
                expires 1y;
       }

       location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt|otf|woff)$ {
                expires 14d;
       }
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 28th February 2012, 22:24
Kozley Kozley is offline
Member
 
Join Date: Mar 2011
Location: Örebro, Sweden
Posts: 41
Thanks: 4
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko View Post
This is what I've added to the nginx Directives field on the Options tab in ISPConfig:

Code:
       # deny running scripts inside writable directories
       location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
                return 403;
                error_page 403 /403_error.html;
       }

       location / {
                try_files $uri $uri/ /index.php?q=$uri&$args;
       }

       # caching of files
       location ~* \.(ico|pdf|flv)$ {
                expires 1y;
       }

       location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt|otf|woff)$ {
                expires 14d;
       }
Thanks for the reply. I added to the nginx Directives and restart php-fpm and reload nginx, also clear browser cache. Same result =(
Reply With Quote
  #4  
Old 29th February 2012, 13:53
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Can you post the full vhost?

Are there any errors in the site's error log or the overall nginx error log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 29th February 2012, 14:19
Kozley Kozley is offline
Member
 
Join Date: Mar 2011
Location: Örebro, Sweden
Posts: 41
Thanks: 4
Thanked 1 Time in 1 Post
Default

Here's the full vhost:
Code:
server {
        listen *:80;


        server_name www.veniversum.eu www.www.veniversum.eu;

        root   /var/www/www.veniversum.eu/web;



        index index.html index.htm index.php index.cgi index.pl index.xhtml;



        error_page 400 /error/400.html;
        error_page 401 /error/401.html;
        error_page 403 /error/403.html;
        error_page 404 /error/404.html;
        error_page 405 /error/405.html;
        error_page 500 /error/500.html;
        error_page 502 /error/502.html;
        error_page 503 /error/503.html;

        error_log /var/log/ispconfig/httpd/www.veniversum.eu/error.log;
        access_log /var/log/ispconfig/httpd/www.veniversum.eu/access.log combined;

        ## Disable .htaccess and other hidden files
        location ~ /\. {
            deny all;
            access_log off;
            log_not_found off;
        }

        location = /favicon.ico {
            log_not_found off;
            access_log off;
        }

        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
        }

        location /stats {
            index index.html index.php;
            auth_basic "Members Only";
            auth_basic_user_file /var/www/clients/client0/web1/.htpasswd_stats;
        }

        location /awstats-icon {
            alias /usr/share/awstats/icon;
        }

        location ~ \.php$ {
            try_files $uri =404;
            include /etc/nginx/fastcgi_params;
            fastcgi_pass 127.0.0.1:9010;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_script_name;
            fastcgi_intercept_errors on;
        }


                location /phpmyadmin {
                       root /usr/share/;
                       index index.php index.html index.htm;
                       location ~ ^/phpmyadmin/(.+\.php)$ {
                               try_files $uri =404;
                               root /usr/share/;
                               fastcgi_pass 127.0.0.1:9000;
                               fastcgi_index index.php;
                               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                               include /etc/nginx/fastcgi_params;
                               fastcgi_buffer_size 128k;
                               fastcgi_buffers 256 4k;
                               fastcgi_busy_buffers_size 256k;
                               fastcgi_temp_file_write_size 256k;
                               fastcgi_intercept_errors on;
                       }
                       location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                               root /usr/share/;
                       }
                }
                location /phpMyAdmin {
                       rewrite ^/* /phpmyadmin last;
                }

                location /cgi-bin/mailman {
                       root /usr/lib/;
                       fastcgi_split_path_info (^/cgi-bin/mailman/[^/]*)(.*)$;
                       include /etc/nginx/fastcgi_params;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       fastcgi_param PATH_INFO $fastcgi_path_info;
                       fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
                       fastcgi_intercept_errors on;
                       fastcgi_pass unix:/var/run/fcgiwrap.socket;
                }
                location /images/mailman {
                       alias /usr/share/images/mailman;
                }
                location /pipermail {
                       alias /var/lib/mailman/archives/public;
                       autoindex on;
                }

               # deny running scripts inside writable directories
               location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
                        return 403;
                        error_page 403 /403_error.html;
               }

               location / {
                        try_files $uri $uri/ /index.php?q=$uri&$args;
               }

               # caching of files
               location ~* \.(ico|pdf|flv)$ {
                        expires 1y;
               }

               location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt|otf|woff)$ {
                        expires 14d;
               }


}
Not overall nginx error log I could see.

EDIT: Now I could see the error log
Code:
2012/02/29 14:40:03 [emerg] 20857#0: open() "/etc/nginx/fastcgi.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/100-www.veniversum.eu.vhost:115
2012/02/29 14:40:03 [emerg] 20858#0: open() "/etc/nginx/fastcgi.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/100-www.veniversum.eu.vhost:115
2012/02/29 14:42:03 [emerg] 20978#0: open() "/etc/nginx/fastcgi.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/100-www.veniversum.eu.vhost:112
2012/02/29 14:42:03 [emerg] 20979#0: open() "/etc/nginx/fastcgi.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/100-www.veniversum.eu.vhost:112
Ok, I see fastcgi.conf is empty in directory. So I don't know what I would make to solve missing fastcgi.conf.

Last edited by Kozley; 29th February 2012 at 16:29.
Reply With Quote
  #6  
Old 29th February 2012, 23:25
Kozley Kozley is offline
Member
 
Join Date: Mar 2011
Location: Örebro, Sweden
Posts: 41
Thanks: 4
Thanked 1 Time in 1 Post
Default

Now I'm gave up! I has to install ubuntu 11.10 and got error 502. I'm back to Apache! Nginx does not works with Joomla 2.5!
Reply With Quote
  #7  
Old 1st March 2012, 21:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by Kozley View Post
Nginx does not works with Joomla 2.5!
It does. I'm running it on nginx myself. But I can't say where the problem is with your configuration. Maybe PHP-FPM wasn't running correctly? There's a bug in the PHP-FPM init script on Ubuntu 11.10 (see chapter 4 on http://www.howtoforge.com/using-php5...n-ubuntu-11.10 ).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Kozley (2nd March 2012)
  #8  
Old 2nd March 2012, 04:43
Kozley Kozley is offline
Member
 
Join Date: Mar 2011
Location: Örebro, Sweden
Posts: 41
Thanks: 4
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko View Post
It does. I'm running it on nginx myself. But I can't say where the problem is with your configuration. Maybe PHP-FPM wasn't running correctly? There's a bug in the PHP-FPM init script on Ubuntu 11.10 (see chapter 4 on http://www.howtoforge.com/using-php5...n-ubuntu-11.10 ).
Thank you so much! It was bugged on the PHP-FPM init script, now it's fixing.

EDIT: I noticed why I got error 503. It was Joomla Offline page problem. I don't know why. Please help!

Last edited by Kozley; 2nd March 2012 at 05:00.
Reply With Quote
  #9  
Old 10th June 2012, 09:27
airflow airflow is offline
Junior Member
 
Join Date: Jun 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello guys,

I am facing a kind of similar situation on my installation which is based on:
http://www.howtoforge.com/perfect-se...nx-ispconfig-3

When I do a clear/fresh installation of joomla (any version) on my server it works perfectly including SEF.

When I move my website from my previous server which is on iis and php+mysql I get "500 - internal server error" on my Frontend!
The back end works perfectly fine.
I have tried turning of SEF as well but no luck.
I have changed both user and group ownership on the transferred files from the previous server which has made all the requirements writable.

I am just not figuring out why this '500 - internal server error' appears! I would really appreciate it if anyone can guide me a little bit through.

Thank in advance
Reply With Quote
  #10  
Old 11th June 2012, 12:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Did you check nginx' error log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

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
nginx Segmentation fault Error,The Perfect Server - CentOS 6 With nginx [ISPConfig 3] alihan1988 HOWTO-Related Questions 0 2nd February 2012 18:07
A Working Nginx Catchall with ISPConfig 3. renders Tips/Tricks/Mods 4 15th April 2011 22:53
Problem with ISPconfig / joomla tremor General 4 1st June 2009 00:35
suPHP, Joomla! 1.5, file & diretory permissions pjdevries Installation/Configuration 17 19th June 2008 03:58
ubuntu ispconfig joomla .htaccess steve1084 General 8 6th January 2007 16:55


All times are GMT +2. The time now is 00:31.


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