Anybody got it running with nginx?

by darkside40, Tuesday, March 19, 2013, 11:28 (4090 days ago)

Hi there,
i just recently tried to let Selfoss run on my VPS using nginx as Webserver and MySQL as DB, without any success.

I followed the installation procedure and used the Config file from the Wiki as sketch.
My simple problem is that i dont get it working at all with User/Password enabled (redirects me to my owncloud page running on the same VPS), when i disable User/Pass i only get a white Page with a bit of text, without any Styles or JS.

I think there is some problem with the rewrite rules and that selfoss cant find its files with the config provided in the Wiki.

If somebody has the latest selfoss running with nginx, please give me some help.

Anybody got it running with nginx?

by Darkwing, Thursday, March 21, 2013, 19:58 (4087 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' : '') .

Anybody got it running with nginx?

by felixqu, Friday, March 22, 2013, 09:57 (4087 days ago) @ Darkwing

I use your conf but still no css

Anybody got it running with nginx?

by Kaffeine, Friday, March 22, 2013, 15:23 (4087 days ago) @ Darkwing

Thanks, that did the trick for me. Now the css is showing properly.

RSS Feed of thread
powered by my little forum