#1 2013-08-20 10:49:05

noahlu
Member
Registered: 2013-08-20
Posts: 6

Does ionize support Nginx server?

Does ionize support Nginx server?

Offline

#2 2013-08-20 12:02:43

adaliszk
Ionize Friend
From: Hungary
Registered: 2010-09-20
Posts: 395
Website

Re: Does ionize support Nginx server?

The Ngnix server have

  • php > 5.2 ?

  • mysql > 5.4 ?

  • curl and php-curl ?

  • .htaccess or something similar?


Webdeveloper, Programmer, Application developer, Ionize friend
@adamos42

Offline

#3 2013-08-20 14:14:26

noahlu
Member
Registered: 2013-08-20
Posts: 6

Re: Does ionize support Nginx server?

well, nginx support mysql php, and support redirect

Offline

#4 2013-08-20 14:34:43

adaliszk
Ionize Friend
From: Hungary
Registered: 2010-09-20
Posts: 395
Website

Re: Does ionize support Nginx server?

Than it probably work I think, I had to install on my own server: apache2, mysql-server, php5, curl, php5-curl (On Debian Squezze) and i had activate the rewrite rule: a2enmod rewrite. smile It will probably work on the ngix as well, only you must make the redirect and enable features.

Last edited by adaliszk (2013-08-20 14:36:17)


Webdeveloper, Programmer, Application developer, Ionize friend
@adamos42

Offline

#5 2013-08-24 17:32:23

andreaspollak
Member
Registered: 2012-10-03
Posts: 27
Website

Re: Does ionize support Nginx server?

Yes, it´s running fine on nginx!

A configuration example for CodeIgniter can be found here:
http://wiki.nginx.org/Codeigniter


Following config snippet should do the job:

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

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

Last edited by andreaspollak (2013-08-24 17:33:18)

Offline

#6 2013-08-25 07:27:54

noahlu
Member
Registered: 2013-08-20
Posts: 6

Re: Does ionize support Nginx server?

Thanks, that's exactly what I'm looking for!

andreaspollak wrote:

Yes, it´s running fine on nginx!

A configuration example for CodeIgniter can be found here:
http://wiki.nginx.org/Codeigniter


Following config snippet should do the job:

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

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

Offline

#7 2013-08-31 11:16:19

Michel-Ange
Ionize Core Team
From: Paris, France
Registered: 2010-03-22
Posts: 927
Website

Re: Does ionize support Nginx server?

@andreaspollak : Could you copy / paste one complete configuration file for ionize on nginx ?


Inspiration & Innovation : Websites by Partikule, Agence Web Paris

Offline

#8 2013-08-31 13:57:49

andreaspollak
Member
Registered: 2012-10-03
Posts: 27
Website

Re: Does ionize support Nginx server?

Michel-Ange wrote:

@andreaspollak : Could you copy / paste one complete configuration file for ionize on nginx ?


Yes, here is a complete example. Fit it to your needs (ip, hostname, port/s) and serve it. This is a basic ISPConfig3 configuration file for nginx, with modifications like described on http://wiki.nginx.org/Codeigniter. There is also a configuration snippet inside, if you want to use it behind an upstream proxy.


server {
        listen IP:PORT;

        server_name my-domain.tld ;

        root   /your-website-root;

        # if you are behind upstream, then use this
        #set_real_ip_from  YOUR-UPSTREAM-IP/32;
        #real_ip_header    X-Forwarded-For;
        #real_ip_recursive on;
		
        ######### upstream settings #########
        # proxy_set_header X-Real-IP $remote_addr;
        # proxy_set_header X-forwarded-for $proxy_add_x_forwarded_for;
        #####################################

        index index.php index.html index.htm 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;
        recursive_error_pages on;
        location = /error/400.html {

            internal;
        }
        location = /error/401.html {

            internal;
        }
        location = /error/403.html {

            internal;
        }
        location = /error/404.html {

            internal;
        }
        location = /error/405.html {

            internal;
        }
        location = /error/500.html {

            internal;
        }
        location = /error/502.html {

            internal;
        }
        location = /error/503.html {

            internal;
        }

        error_log /var/log/your-error.log;
        access_log /var/log/your-access.log combined;

        # serve static content directly, fit this to your needs
        location ~* ^.+\.(jpg|js|jpeg|png|ico|gif|txt|js|css|swf|zip|rar|avi|exe|mpg|mp3|wav|mpeg|asf|wmv)$ {
                access_log off;
                expires 7d;
                break;
        }


        # not needed if above location setting is used
        location ~ /\.thumbs  {
                allow all;
                access_log off;
                #log_not_found off;
        }
        
        # deny request of .files, .folders
        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 / {
        	# Check if a file exists, or route it to index.php.
        	try_files $uri $uri/ /index.php?$args;
        }

        location ~ \.php$ {

                try_files $uri =404;
		
                include /etc/nginx/fastcgi_params;
		
                #### fastcgi_params file - start (this is content from fastcgi_params file) ####
                fastcgi_param	QUERY_STRING		$query_string;
                fastcgi_param	REQUEST_METHOD		$request_method;
                fastcgi_param	CONTENT_TYPE		$content_type;
                fastcgi_param	CONTENT_LENGTH		$content_length;
		
                fastcgi_param	SCRIPT_FILENAME		$request_filename;
                fastcgi_param	SCRIPT_NAME		$fastcgi_script_name;
                fastcgi_param	REQUEST_URI		$request_uri;
                fastcgi_param	DOCUMENT_URI		$document_uri;
                fastcgi_param	DOCUMENT_ROOT		$document_root;
                fastcgi_param	SERVER_PROTOCOL		$server_protocol;
		
                fastcgi_param	GATEWAY_INTERFACE	CGI/1.1;
                fastcgi_param	SERVER_SOFTWARE		nginx/$nginx_version;
		
                fastcgi_param	REMOTE_ADDR		$remote_addr;
                fastcgi_param	REMOTE_PORT		$remote_port;
                fastcgi_param	SERVER_ADDR		$server_addr;
                fastcgi_param	SERVER_PORT		$server_port;
                fastcgi_param	SERVER_NAME		$server_name;
		
                fastcgi_param	HTTPS			$https if_not_empty;
		
                # PHP only, required if PHP was built with --enable-force-cgi-redirect
                fastcgi_param	REDIRECT_STATUS		200;     
                #### fastcgi_params file - stop ####
		
		
                fastcgi_pass FPM-HOST-IP:FPM-PORT;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;
		
                # we want to use ionize error pages
                #fastcgi_intercept_errors on;
        }
}

Offline

#9 2013-08-31 18:13:15

Michel-Ange
Ionize Core Team
From: Paris, France
Registered: 2010-03-22
Posts: 927
Website

Re: Does ionize support Nginx server?

Thanks !


Inspiration & Innovation : Websites by Partikule, Agence Web Paris

Offline

#10 2013-12-04 23:24:23

lweijl
Member
Registered: 2013-12-04
Posts: 2

Re: Does ionize support Nginx server?

andreaspollak wrote:
Michel-Ange wrote:

@andreaspollak : Could you copy / paste one complete configuration file for ionize on nginx ?


Yes, here is a complete example. Fit it to your needs (ip, hostname, port/s) and serve it. This is a basic ISPConfig3 configuration file for nginx, with modifications like described on http://wiki.nginx.org/Codeigniter. There is also a configuration snippet inside, if you want to use it behind an upstream proxy.


server {
        listen IP:PORT;

        server_name my-domain.tld ;

        root   /your-website-root;

        # if you are behind upstream, then use this
        #set_real_ip_from  YOUR-UPSTREAM-IP/32;
        #real_ip_header    X-Forwarded-For;
        #real_ip_recursive on;
		
        ######### upstream settings #########
        # proxy_set_header X-Real-IP $remote_addr;
        # proxy_set_header X-forwarded-for $proxy_add_x_forwarded_for;
        #####################################

        index index.php index.html index.htm 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;
        recursive_error_pages on;
        location = /error/400.html {

            internal;
        }
        location = /error/401.html {

            internal;
        }
        location = /error/403.html {

            internal;
        }
        location = /error/404.html {

            internal;
        }
        location = /error/405.html {

            internal;
        }
        location = /error/500.html {

            internal;
        }
        location = /error/502.html {

            internal;
        }
        location = /error/503.html {

            internal;
        }

        error_log /var/log/your-error.log;
        access_log /var/log/your-access.log combined;

        # serve static content directly, fit this to your needs
        location ~* ^.+\.(jpg|js|jpeg|png|ico|gif|txt|js|css|swf|zip|rar|avi|exe|mpg|mp3|wav|mpeg|asf|wmv)$ {
                access_log off;
                expires 7d;
                break;
        }


        # not needed if above location setting is used
        location ~ /\.thumbs  {
                allow all;
                access_log off;
                #log_not_found off;
        }
        
        # deny request of .files, .folders
        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 / {
        	# Check if a file exists, or route it to index.php.
        	try_files $uri $uri/ /index.php?$args;
        }

        location ~ \.php$ {

                try_files $uri =404;
		
                include /etc/nginx/fastcgi_params;
		
                #### fastcgi_params file - start (this is content from fastcgi_params file) ####
                fastcgi_param	QUERY_STRING		$query_string;
                fastcgi_param	REQUEST_METHOD		$request_method;
                fastcgi_param	CONTENT_TYPE		$content_type;
                fastcgi_param	CONTENT_LENGTH		$content_length;
		
                fastcgi_param	SCRIPT_FILENAME		$request_filename;
                fastcgi_param	SCRIPT_NAME		$fastcgi_script_name;
                fastcgi_param	REQUEST_URI		$request_uri;
                fastcgi_param	DOCUMENT_URI		$document_uri;
                fastcgi_param	DOCUMENT_ROOT		$document_root;
                fastcgi_param	SERVER_PROTOCOL		$server_protocol;
		
                fastcgi_param	GATEWAY_INTERFACE	CGI/1.1;
                fastcgi_param	SERVER_SOFTWARE		nginx/$nginx_version;
		
                fastcgi_param	REMOTE_ADDR		$remote_addr;
                fastcgi_param	REMOTE_PORT		$remote_port;
                fastcgi_param	SERVER_ADDR		$server_addr;
                fastcgi_param	SERVER_PORT		$server_port;
                fastcgi_param	SERVER_NAME		$server_name;
		
                fastcgi_param	HTTPS			$https if_not_empty;
		
                # PHP only, required if PHP was built with --enable-force-cgi-redirect
                fastcgi_param	REDIRECT_STATUS		200;     
                #### fastcgi_params file - stop ####
		
		
                fastcgi_pass FPM-HOST-IP:FPM-PORT;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;
		
                # we want to use ionize error pages
                #fastcgi_intercept_errors on;
        }
}

This configuration seems not to be working for me.

I did a clean git clone of the ionze repo from github, checking out 1.0.4 right after it.
Installed the database and the sample data (which should also add a working example theme) using the above nginx configuration. Also removed the install directory, as instructed.

The home itself is displayed, but without markup. The admin section is displayed with markup, but when logging in with the administrator account it redirects back to the admin sections login screen.

Any idea what I am doing wrong here?? Nothing of interest seems be in any of the nginx log files.

server {
        listen 80;
        server_name example.com;
        root   /var/www/example.com/ionize;
        index index.php index.html index.htm 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;
        recursive_error_pages on;

        location = /error/400.html {
            internal;
        }

        location = /error/401.html {
            internal;
        }

        location = /error/403.html {
            internal;
        }

        location = /error/404.html {
            internal;
        }

        location = /error/405.html {
            internal;
        }

        location = /error/500.html {
            internal;
        }

        location = /error/502.html {
            internal;
        }

        location = /error/503.html {
            internal;
        }

        access_log /var/log/nginx/examplecom_access.log;
        error_log /var/log/nginx/examplecom_error.log error;

        # serve static content directly, fit this to your needs
        location ~* ^.+\.(jpg|js|jpeg|png|ico|gif|txt|js|css|swf|zip|rar|avi|exe|mpg|mp3|wav|mpeg|asf|wmv)$ {
                access_log off;
                expires 7d;
                break;
        }

        # not needed if above location setting is used
        location ~ /\.thumbs  {
                allow all;
                access_log off;
                #log_not_found off;
        }

        # deny request of .files, .folders
        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 / {
                try_files $uri $uri/ /index.php?$args;
        }

        location ~ \.php$ {
                try_files $uri =404;
                include /etc/nginx/fastcgi_params;

                #### fastcgi_params file - start (this is content from fastcgi_params file) ####
                fastcgi_param   QUERY_STRING            $query_string;
                fastcgi_param   REQUEST_METHOD          $request_method;
                fastcgi_param   CONTENT_TYPE            $content_type;
                fastcgi_param   CONTENT_LENGTH          $content_length;

                fastcgi_param   SCRIPT_FILENAME         $request_filename;
                fastcgi_param   SCRIPT_NAME             $fastcgi_script_name;
                fastcgi_param   REQUEST_URI             $request_uri;
                fastcgi_param   DOCUMENT_URI            $document_uri;
                fastcgi_param   DOCUMENT_ROOT           $document_root;
                fastcgi_param   SERVER_PROTOCOL         $server_protocol;

                fastcgi_param   GATEWAY_INTERFACE       CGI/1.1;
                fastcgi_param   SERVER_SOFTWARE         nginx/$nginx_version;

                fastcgi_param   REMOTE_ADDR             $remote_addr;
                fastcgi_param   REMOTE_PORT             $remote_port;
                fastcgi_param   SERVER_ADDR             $server_addr;
                fastcgi_param   SERVER_PORT             $server_port;
                fastcgi_param   SERVER_NAME             $server_name;

                fastcgi_param   HTTPS                   $https if_not_empty;

                # PHP only, required if PHP was built with --enable-force-cgi-redirect
                #fastcgi_param  REDIRECT_STATUS         200;
                #### fastcgi_params file - stop ####


                fastcgi_pass unix:/var/run/php5-fpm_examplecom.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;

                # we want to use ionize error pages
                fastcgi_intercept_errors on;
        }
}

Last edited by lweijl (2013-12-04 23:25:19)

Offline

#11 2013-12-05 05:42:45

andreaspollak
Member
Registered: 2012-10-03
Posts: 27
Website

Re: Does ionize support Nginx server?

Hello!

I did a clean git clone of the ionze repo from github, checking out 1.0.4 right after it.

I'am using this zip in currently 8+ projects https://github.com/ionize/ionize/archive/1.0.4.zip without trouble.

Tested environments: nginx 1.3 - 1.4, debian 6/7, php 5.3
What about your environment?
- PHP Version
- Nginx Version


The home itself is displayed, but without markup.

Do you really see a white Page only?
Did you check your logfiles and what's the result?

The admin section is displayed with markup, but when logging in with the administrator account it redirects back to the admin sections login screen.

I have a similiar problem if index_page variable is not blank. By default it is blank:

$config['index_page'] = "";

I would advise you, to check your logfiles first. Turn on PHP error logging, if using php-fpm.

Best regards

Offline

#12 2013-12-05 08:53:10

lweijl
Member
Registered: 2013-12-04
Posts: 2

Re: Does ionize support Nginx server?

andreaspollak wrote:

Tested environments: nginx 1.3 - 1.4, debian 6/7, php 5.3
What about your environment?
- PHP Version
- Nginx Version

In run Debian 7.0.2 (Wheezy) with Nginx 1.2.1, php-fpm and PHP version 5.5.6.

The home itself is displayed, but without markup.

Do you really see a white Page only?
Did you check your logfiles and what's the result?

No, not a white page only. I see some demo content, like the language link and some information about ionize (for example: Template System: Each page or article can have a dedicated template, templates can be embeded in each others. The tag language of Ionize is simple and fully documented.)

The admin section is displayed with markup, but when logging in with the administrator account it redirects back to the admin sections login screen.

I have a similiar problem if index_page variable is not blank. By default it is blank:

$config['index_page'] = "";

I checked the config for index_page and it is blank, never touched it.

I would advise you, to check your logfiles first. Turn on PHP error logging, if using php-fpm.

I turned on PHP error logging but no errors are showing up in the log files. The error log shows nothing, the access log the following.

Home page

[05/Dec/2013:07:44:21 +0100] "GET / HTTP/1.1" 200 1106 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"

Admin section

80.56.192.210 - - [05/Dec/2013:07:46:33 +0100] "GET /en/admin/auth/login HTTP/1.1" 200 1578 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:33 +0100] "GET /themes/admin/javascript/mootools-core-1.4.5-full-nocompat-yc.js HTTP/1.1" 304 0 "http://example.com/en/admin/auth/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:33 +0100] "GET /themes/admin/javascript/mootools-more-1.4.0.1.js HTTP/1.1" 304 0 "http://example.com/en/admin/auth/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:33 +0100] "GET /themes/admin/styles/original/css/login.css HTTP/1.1" 304 0 "http://example.com/en/admin/auth/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:33 +0100] "GET /themes/admin/styles/original/css/form.css HTTP/1.1" 304 0 "http://example.com/en/admin/auth/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:34 +0100] "GET /themes/admin/styles/original/images/background/squairy_light.png HTTP/1.1" 304 0 "http://example.com/themes/admin/styles/original/css/login.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:34 +0100] "GET /themes/admin/styles/original/images/application_login_window_bg.jpg HTTP/1.1" 304 0 "http://example.com/themes/admin/styles/original/css/login.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:34 +0100] "GET /themes/admin/styles/original/images/application_login_logo.png HTTP/1.1" 304 0 "http://example.com/themes/admin/styles/original/css/login.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"

The only thing I can think of is that Ionize does not support PHP 5.5 yet. But I got no clues whatsoever from any log file so far and no errors pointing me in a direction. If you or anyone could help me tackle this I'd be gracefull.

edit:
Log file from ionize itself

DEBUG - 2013-12-05 08:06:24 --> Config Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Hooks Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Utf8 Class Initialized
DEBUG - 2013-12-05 08:06:24 --> UTF-8 Support Enabled
DEBUG - 2013-12-05 08:06:24 --> URI Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Config file loaded: /var/www/example.com/ionize/application/config/language.php
DEBUG - 2013-12-05 08:06:24 --> Config file loaded: /var/www/example.com/ionize/application/config/ionize.php
DEBUG - 2013-12-05 08:06:24 --> Router: The key "" was not a valid language key.
DEBUG - 2013-12-05 08:06:24 --> Router: Applying the language key "en".
DEBUG - 2013-12-05 08:06:24 --> Router Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Output Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Security Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Input Class Initialized
DEBUG - 2013-12-05 08:06:24 --> XSS Filtering completed
DEBUG - 2013-12-05 08:06:24 --> XSS Filtering completed
DEBUG - 2013-12-05 08:06:24 --> Global POST and COOKIE data sanitized
DEBUG - 2013-12-05 08:06:24 --> Language Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Loader Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Config file loaded: /var/www/example.com/ionize/application/config/forms.php
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: url_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: form_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: dump_variable_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: language_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: date_helper
DEBUG - 2013-12-05 08:06:24 --> Config file loaded: /var/www/example.com/ionize/application/config/events.php
DEBUG - 2013-12-05 08:06:24 --> Class Module initialized
DEBUG - 2013-12-05 08:06:24 --> Controller Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> User Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Encrypt Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Native_session Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Config file loaded: /var/www/example.com/ionize/application/config/user.php
DEBUG - 2013-12-05 08:06:24 --> Language file loaded: language/en/user_lang
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: cookie_helper
DEBUG - 2013-12-05 08:06:24 --> Authority Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: path_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: file_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: trace_helper
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Event::fire() : Ionize.front.load
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: text_helper
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Tagmanager::render() : Render of the view : core/page
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Media_model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Final output sent to browser
DEBUG - 2013-12-05 08:06:24 --> Total execution time: 0.1702

Last edited by lweijl (2013-12-05 09:08:44)

Offline

#13 2015-02-06 05:32:00

andretw
Member
Registered: 2015-02-06
Posts: 1

Re: Does ionize support Nginx server?

I had also met this issue. But for my case, I noticed that "admin login process" always got failed, yes, as same as your situation, without any useful information. Then, I tried to print out the encrypt stuff, I found out that my system's default php.ini had no mcrypt_encrypt module! What the heck...

After the revised, I fixed this issue.

lweijl wrote:
andreaspollak wrote:

Tested environments: nginx 1.3 - 1.4, debian 6/7, php 5.3
What about your environment?
- PHP Version
- Nginx Version

In run Debian 7.0.2 (Wheezy) with Nginx 1.2.1, php-fpm and PHP version 5.5.6.

The home itself is displayed, but without markup.

Do you really see a white Page only?
Did you check your logfiles and what's the result?

No, not a white page only. I see some demo content, like the language link and some information about ionize (for example: Template System: Each page or article can have a dedicated template, templates can be embeded in each others. The tag language of Ionize is simple and fully documented.)

The admin section is displayed with markup, but when logging in with the administrator account it redirects back to the admin sections login screen.

I have a similiar problem if index_page variable is not blank. By default it is blank:

$config['index_page'] = "";

I checked the config for index_page and it is blank, never touched it.

I would advise you, to check your logfiles first. Turn on PHP error logging, if using php-fpm.

I turned on PHP error logging but no errors are showing up in the log files. The error log shows nothing, the access log the following.

Home page

[05/Dec/2013:07:44:21 +0100] "GET / HTTP/1.1" 200 1106 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"

Admin section

80.56.192.210 - - [05/Dec/2013:07:46:33 +0100] "GET /en/admin/auth/login HTTP/1.1" 200 1578 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:33 +0100] "GET /themes/admin/javascript/mootools-core-1.4.5-full-nocompat-yc.js HTTP/1.1" 304 0 "http://example.com/en/admin/auth/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:33 +0100] "GET /themes/admin/javascript/mootools-more-1.4.0.1.js HTTP/1.1" 304 0 "http://example.com/en/admin/auth/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:33 +0100] "GET /themes/admin/styles/original/css/login.css HTTP/1.1" 304 0 "http://example.com/en/admin/auth/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:33 +0100] "GET /themes/admin/styles/original/css/form.css HTTP/1.1" 304 0 "http://example.com/en/admin/auth/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:34 +0100] "GET /themes/admin/styles/original/images/background/squairy_light.png HTTP/1.1" 304 0 "http://example.com/themes/admin/styles/original/css/login.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:34 +0100] "GET /themes/admin/styles/original/images/application_login_window_bg.jpg HTTP/1.1" 304 0 "http://example.com/themes/admin/styles/original/css/login.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"
[05/Dec/2013:07:46:34 +0100] "GET /themes/admin/styles/original/images/application_login_logo.png HTTP/1.1" 304 0 "http://example.com/themes/admin/styles/original/css/login.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0"

The only thing I can think of is that Ionize does not support PHP 5.5 yet. But I got no clues whatsoever from any log file so far and no errors pointing me in a direction. If you or anyone could help me tackle this I'd be gracefull.

edit:
Log file from ionize itself

DEBUG - 2013-12-05 08:06:24 --> Config Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Hooks Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Utf8 Class Initialized
DEBUG - 2013-12-05 08:06:24 --> UTF-8 Support Enabled
DEBUG - 2013-12-05 08:06:24 --> URI Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Config file loaded: /var/www/example.com/ionize/application/config/language.php
DEBUG - 2013-12-05 08:06:24 --> Config file loaded: /var/www/example.com/ionize/application/config/ionize.php
DEBUG - 2013-12-05 08:06:24 --> Router: The key "" was not a valid language key.
DEBUG - 2013-12-05 08:06:24 --> Router: Applying the language key "en".
DEBUG - 2013-12-05 08:06:24 --> Router Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Output Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Security Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Input Class Initialized
DEBUG - 2013-12-05 08:06:24 --> XSS Filtering completed
DEBUG - 2013-12-05 08:06:24 --> XSS Filtering completed
DEBUG - 2013-12-05 08:06:24 --> Global POST and COOKIE data sanitized
DEBUG - 2013-12-05 08:06:24 --> Language Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Loader Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Config file loaded: /var/www/example.com/ionize/application/config/forms.php
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: url_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: form_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: dump_variable_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: language_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: date_helper
DEBUG - 2013-12-05 08:06:24 --> Config file loaded: /var/www/example.com/ionize/application/config/events.php
DEBUG - 2013-12-05 08:06:24 --> Class Module initialized
DEBUG - 2013-12-05 08:06:24 --> Controller Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> User Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Encrypt Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Native_session Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Config file loaded: /var/www/example.com/ionize/application/config/user.php
DEBUG - 2013-12-05 08:06:24 --> Language file loaded: language/en/user_lang
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: cookie_helper
DEBUG - 2013-12-05 08:06:24 --> Authority Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: path_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: file_helper
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: trace_helper
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Event::fire() : Ionize.front.load
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Helper loaded: text_helper
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Tagmanager::render() : Render of the view : core/page
DEBUG - 2013-12-05 08:06:24 --> Model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Database Driver Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Media_model Class Initialized
DEBUG - 2013-12-05 08:06:24 --> Final output sent to browser
DEBUG - 2013-12-05 08:06:24 --> Total execution time: 0.1702

Offline

#14 2015-05-08 00:35:43

abda11ah
Member
Registered: 2015-04-23
Posts: 4

Re: Does ionize support Nginx server?

This config file from CodeIgniter worked fine for me (Nginx 1.6.2 on Ubuntu 15.04 / PHP 5.6.4-4ubuntu6) :

server {
    #listen 80;
    #listen [::]:80 default_server ipv6only=on;

    root /var/www/html;
    index index.html index.php;

    server_name localhost;

    autoindex on;
    index index.html index.php;
    location / {
 
            try_files $uri $uri/ /index.php;
 
            location = /index.php {
 
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_param  SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
                include        fastcgi_params;
            }
        }
 
        location ~ \.php$ {
            return 444;
        }
}

Last edited by abda11ah (2015-05-08 00:36:56)

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations