Anybody got it running with nginx?

by Darkwing, Thursday, March 21, 2013, 19:58 (4045 days ago) @ darkside40

Hi darkside40,

I'm running selfoss on my RaspberryPi on nginx and sqlite.

You problem is maybe the rewirtes in the .htaccess-file.
Nginx doesn't use the .htaccess so you have to code the rewrites into the server-config.

Here's an example:

server {
listen 81;
server_name 123.456.789.000;
root /path/to/selfoss/;

location ~* \ (gif|jpg|png) {
expires 30d;
}

location ~ ^/favicons/.*$ {
try_files $uri /data/$uri;
}

location / {
index index.php index.html index.htm;
try_files $uri /public/$uri /index.php$is_args$args;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

location ~ .php$ {
# fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
}

}

The other problem (https) is the owncloud-server. If you change to https, your use port 443. But this port is (maybe) in use by your owncloud-server.
You can switch off https in selfoss by editing the file
selfoss/helpers/viw.php

comment or delete line 50:
(isset($_SERVER["HTTPS"])=="on" ? 's' : '') .


Complete thread:

 RSS Feed of thread

powered by my little forum