#1  
Old 13th April 2013, 22:57
nackgr nackgr is offline
Member
 
Join Date: Nov 2012
Posts: 31
Thanks: 4
Thanked 0 Times in 0 Posts
Default Magento config ?!

Hello

i cant make my magento to work

the conf is

Code:
server {
        listen *:80;


        server_name e-byte.gr www.e-byte.gr;

        root   /var/www/e-byte.gr/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;
        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/ispconfig/httpd/e-byte.gr/error.log;
        access_log /var/log/ispconfig/httpd/e-byte.gr/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/client12/web26/web/stats/.htpasswd_stats;
        }

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

        location ~ \.php$ {
            try_files /f9aa2e679f9241571358e6022a522d80.htm @php;
        }

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


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


}
Reply With Quote
Sponsored Links
  #2  
Old 15th April 2013, 15:40
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 39
Thanked 89 Times in 68 Posts
Default

Take a look here:

http://wiki.nginx.org/Magento

Cheers
Reply With Quote
The Following User Says Thank You to pititis For This Useful Post:
sistemas (15th April 2013)
  #3  
Old 15th April 2013, 20:20
nackgr nackgr is offline
Member
 
Join Date: Nov 2012
Posts: 31
Thanks: 4
Thanked 0 Times in 0 Posts
Default

i tried the 1.7 solution at

nginx/site-available folder but dont work..
Reply With Quote
  #4  
Old 15th April 2013, 20:49
nackgr nackgr is offline
Member
 
Join Date: Nov 2012
Posts: 31
Thanks: 4
Thanked 0 Times in 0 Posts
Default

i changed to that


now when i click site url goes to

http://e-byte.gr/index.php/install/

but gets

500 Internal Server Error
nginx/1.0.15


thats my php

http://e-byte.gr/php.php


Code:
server {
    listen 80;
    server_name www.e-byte.gr;
    root /var/www/e-byte.gr/web;

    ## allow for html source of super high volume product pages to be put in "static" directory and served without php
    if ($http_host ~ "^(.*)e-byte.gr"){
        set $rule_0 1;
    }
    if ($uri ~ "^(.*)$"){
        set $rule_0 2$rule_0;
    }
    if ($http_referer !~* ".*e-byte.gr"){
        set $rule_0 3$rule_0;
    }
    if (-f $document_root/static$request_uri){
        set $rule_0 4$rule_0;
    }
    if ($rule_0 = "4321"){
        rewrite ^/.*$ /static/$request_uri last;
    }

    ## Images and static content is treated different
    location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
            access_log        off;
            expires           30d;
            root /var/www/e-byte.gr/web/;
    }

    location / {
        index index.html index.php; ## Allow a static html file to be shown first
        try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
        expires 30d; ## Assume all files are cachable
    }

    ## These locations would be hidden by .htaccess normally
    location /app/                { deny all; }
    location /includes/           { deny all; }
    location /lib/                { deny all; }
    location /media/downloadable/ { deny all; }
    location /pkginfo/            { deny all; }
    location /report/config.xml   { deny all; }
    location /var/                { deny all; }
    location /nginx-config/       { deny all; }

    location  /. { ## Disable .htaccess and other hidden files
        return 404;
    }

    location @handler { ## Magento uses a common front handler
        rewrite / /index.php;
    }

    location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
        rewrite ^(.*.php)/ $1 last;
    }

    location ~ .php$ { ## Execute PHP scripts
        if (!-e $request_filename) { rewrite / /index.php last; } ## Catch 404s that try_files miss

        expires        off; ## Do not cache dynamic content
        fastcgi_pass   127.0.0.1:9035;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 4 256k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_read_timeout 120;
fastcgi_param  MAGE_RUN_CODE default;
fastcgi_param  MAGE_RUN_TYPE store;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    

        include        fastcgi_params; ## See /etc/nginx/fastcgi_params
    }

  access_log /var/log/nginx/e-byte.gr-access_log combined;
}

Last edited by nackgr; 15th April 2013 at 20:59.
Reply With Quote
  #5  
Old 15th April 2013, 21:05
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 39
Thanked 89 Times in 68 Posts
Default

Paste your code snippet in ispconfig (websites->yoursite->options->nginx directives. Don't override the vhost file.

In this example from nginx.org you will need to paste only:

Code:
location ^~ /(app|includes|lib|media/downloadable|pkginfo|report/config.xml|var)/ { internal; }
  location /var/export/ { internal; }
  location /. { return 404; }
  location @handler { rewrite / /index.php; }
  location ~* .php/ { rewrite ^(.*.php)/ $1 last; }
  location ~* .php$ {
    if (!-e $request_filename) { rewrite / /index.php last; }

Last edited by pititis; 15th April 2013 at 21:09.
Reply With Quote
  #6  
Old 15th April 2013, 21:35
nackgr nackgr is offline
Member
 
Join Date: Nov 2012
Posts: 31
Thanks: 4
Thanked 0 Times in 0 Posts
Default

and now i get

Code:
[root@host ~]# /etc/init.d/nginx restart
nginx: [emerg] unexpected end of file, expecting "}" in /etc/nginx/sites-enabled/100-e-byte.gr.vhost:123
nginx: configuration file /etc/nginx/nginx.conf test failed

i pasted that to directives nginx

Code:
location ^~ /(app|includes|lib|media/downloadable|pkginfo|report/config.xml|var)/ { internal; }
  location /var/export/ { internal; }
  location /. { return 404; }
  location @handler { rewrite / /index.php; }
  location ~* .php/ { rewrite ^(.*.php)/ $1 last; }
  location ~* .php$ {
    if (!-e $request_filename) { rewrite / /index.php last; }

site-enable conf
Code:
server {
        listen *:80;


        server_name e-byte.gr www.e-byte.gr;

        root   /var/www/e-byte.gr/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;
        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/ispconfig/httpd/e-byte.gr/error.log;
        access_log /var/log/ispconfig/httpd/e-byte.gr/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/client12/web26/web/stats/.htpasswd_stats;
        }

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

        location ~ \.php$ {
            try_files /4657a24ec4feccf1c4ac4e483ef026a9.htm @php;
        }

        location @php {
            try_files $uri =404;
            include /etc/nginx/fastcgi_params;
            fastcgi_pass 127.0.0.1:9035;
            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 ^~ /(app|includes|lib|media/downloadable|pkginfo|report/config.xml|var)/ {
internal; 
        }
        location /var/export/ {
internal; 
        }
        location /. {
return 404; 
        }
        location @handler {
rewrite / /index.php; 
        }
        location ~* .php/ {
rewrite ^(.*.php)/ $1 last; 
        }
        location ~* .php$ {
            if (!-e $request_filename) { rewrite / /index.php last; }


        }
Reply With Quote
  #7  
Old 15th April 2013, 22:20
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 39
Thanked 89 Times in 68 Posts
 
Default

Yes, missing }


Code:
location ^~ /(app|includes|lib|media/downloadable|pkginfo|report/config.xml|var)/ { internal; }
  location /var/export/ { internal; }
  location /. { return 404; }
  location @handler { rewrite / /index.php; }
  location ~* .php/ { rewrite ^(.*.php)/ $1 last; }
  location ~* .php$ {
    if (!-e $request_filename) { rewrite / /index.php last; }
}
I guess that should work now but I don't have idea about magento
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
Dovecot v2 with ISPConfig 3 CSsab Installation/Configuration 13 13th September 2012 20:01
Spamsnake - Problem with spamassassin, FuzzyOcr and MySQL debuguser HOWTO-Related Questions 6 16th September 2008 19:37
ISPConfig 2.2.14 released till General 48 20th July 2007 00:46
Anyone figured out to integrate FuzzyOCR into ISPConfig on Ubuntu? friday Installation/Configuration 16 10th May 2007 17:25
spamassasin/clamAV not working Daisy Installation/Configuration 32 15th February 2007 01:09


All times are GMT +2. The time now is 16:34.


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