Nginx Apache Rewrite Sweetcron


#1

Hi,

I’ve got a Sweetcron (sweetcron.com) install running on my slice with
nginx.

The standard sweetcron .htaccess look like this:

Options +FollowSymLinks
RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

My /etc/nginx/sites-enabled/nerstu.se look like this:

server {
listen 80;
server_name www.nerstu.se;
rewrite ^/(.*) http://nerstu.se/$1 permanent;
}

server {
listen 80;
server_name nerstu.se;
client_max_body_size 2m;

    access_log /home/a83/public_html/nerstu.se/log/access.log;
    error_log /home/a83/public_html/nerstu.se/log/error.log;

    location / {
            root /home/a83/public_html/nerstu.se/public/;
            index index.php;
    }

    # .php and .php5 sent to php5
    location ~ .*\.php[345]?$ {
            include /etc/nginx/fcgi.conf;
            fastcgi_pass 127.0.0.1:10005;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME

/home/a83/public_html/nerstu.se/public$fastcgi_script_name;
}
}

Does anyone know how I make it work? Thanks a lot in advance!


#2

This rule:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

could be done like this:

error_page 404 = /index.php?q=$1;


#3

Robert G. wrote:

This rule:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

could be done like this:

error_page 404 = /index.php?q=$1;

location / {
root /home/a83/public_html/nerstu.se/public/;
index index.php;
error_page 404 = /index.php?q=$1;

}


#4

Robert G. wrote:

Robert G. wrote:

This rule:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

could be done like this:

error_page 404 = /index.php?q=$1;

location / {
root /home/a83/public_html/nerstu.se/public/;
index index.php;
error_page 404 = /index.php?q=$1;

}

Thanks a lot, anyone knows how to solve the follow symlinks part? The
site ain’t working yet :frowning: