oxwall on ISPConfig 3 with nginx - CentOS 6

Discussion in 'ISPConfig 3 Priority Support' started by inside83, Mar 4, 2015.

  1. inside83

    inside83 Member

    Last edited: Mar 4, 2015
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I dont use oxwall, so I cant tell you which exact directives you will have to use for this software. Try to leave out the php and server part:

    Code:
    if ($uri !~ "^/index.php"){
    set $rule 1$rule;
    }
    if ($uri !~ "/ow_updates/index.php"){
    set $rule 2$rule;
    }
    if ($uri !~ "/ow_updates/"){
    set $rule 3$rule;
    }
    if ($uri !~ "/ow_cron/run.php"){
    set $rule 4$rule;
    }
    if ($uri ~ "(/|.php|.html|.htm|.xml|.feed|robots.txt|.raw|/[^.]*)$"){
    set $rule 5$rule;
    }
    if ($rule = "54321"){
    rewrite /(.*) /index.php last;
    }
    
    # Cache static content
    location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|mp3|zip|tgz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|flv|bmp|rtf|js|swf)$ {
    access_log off;
    root /home/user/public_html;
    expires 720h;
    add_header Last-Modified: $date_gmt;
    }
    
    location ~ \.(js.gz|js.gzip)$
    {
    access_log off;
    add_header Content-Type ‘text/javascript’;
    add_header Content-Encoding ‘gzip’;
    expires [URL='http://www.php.net/max']max[/URL];
    }
    
    location ~ \.(css.gz|css.gzip)$
    {
    access_log off;
    add_header Content-Type ‘text/css’;
    expires [URL='http://www.php.net/max']max[/URL];
    }
    
    I dont think so.
     
  3. inside83

    inside83 Member

    With this I get: 500 Internal Server Error
    :/
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Then check the error.log of the websit to find out why.
     
  5. inside83

    inside83 Member

    /var/www/clients/client1/web4/log folder is empty
    I managed to get it to work by adding this to Rewrite Rules on Redirect tab:
    Code:
    if ($uri !~ "^/index.php"){
        set $rule_0 1$rule_0;
    }
    if ($uri !~ "/ow_updates/index.php"){
        set $rule_0 2$rule_0;
    }
    if ($uri !~ "/ow_updates/"){
        set $rule_0 3$rule_0;
    }
    if ($uri !~ "/ow_cron/run.php"){
        set $rule_0 4$rule_0;
    }
    if ($uri !~ "/e500.php"){
        set $rule_0 5$rule_0;
    }
    if ($request_filename ~ "(/|.php|.html|.htm|.xml|.feed|robots.txt|.raw|/[^.]*)$"){
        set $rule_0 6$rule_0;
    }
    if ($rule_0 = "654321"){
        rewrite /(.*) /index.php;
    }
    and adding this to nginx Directives on Options tab:
    Code:
    location ~*  \.(jpg|jpeg|png|gif|ico|css|js|woff)$ {
            expires 365d;
        }
    Is this correct?
    I meant is there a repository of nginx directives for ISPConfig 3, so I don't have to ask every time.
     

Share This Page