Forum: NGINX Nginx Apache Rewrite Sweetcron

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A83 S. (Guest)
on 2008-10-09 01:36
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!
Robert G. (Guest)
on 2008-10-09 12:35
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;
Robert G. (Guest)
on 2008-10-09 12:35
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;
....
}
A83 S. (Guest)
on 2008-10-10 12:31
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 :(
This topic is locked and can not be replied to.