# Nginx displaying blank page, doesn't error

**URL:** <https://www.ruby-forum.com/t/nginx-displaying-blank-page-doesnt-error/213105>\
**Category:** NGINX\
**Created:** [October 24, 2011, 6:11am UTC](https://www.ruby-forum.com/t/nginx-displaying-blank-page-doesnt-error/213105 "2011-10-24T06:11:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [October 24, 2011, 6:11am UTC](https://www.ruby-forum.com/t/nginx-displaying-blank-page-doesnt-error/213105/1 "2011-10-24T06:11:16Z")

</div>

So I’m attempting to move my OwnCloud instance from Apache to Nginx  
because I heard it was better on low-spec machines (the box is  
basically a recycled desktop from like 2004; P4 + 1GB of RAM )

I’ve always run OwnCloud out of a home directory for ease of use with  
samba and non-root privs. The tutorial I followed had me place it back  
in /srv/http and it worked fine there; now I’m trying to figure out  
why when I try to configure it back to /home, it DOESNT work.

The working config:

user http;

worker\_processes 1;

#pid logs/nginx.pid;

events {  
worker\_connections 1024;  
}

http {  
include mime.types;  
default\_type application/octet-stream;

```
sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

```

server {  
listen 80;  
server\_name localhost;

location / {  
root /srv/http/owncloud;  
index index.html index.php;  
}

location ~ .php$ {  
root /srv/http/owncloud;  
fastcgi\_pass unix:/var/run/php-fpm/php-fpm.sock;  
fastcgi\_index index.php;  
fastcgi\_param SCRIPT\_FILENAME  
/srv/http/owncloud/$fastcgi\_script\_name;  
include fastcgi\_params;  
}  
}

}

In that setup; its set to run via /srv/http/owncloud, under the user  
http. And it works fine, displays the webpage no problem. (Complains  
about not having permission to the database, but thats cuz its running  
as http, and the database is set for public)

Below all I attempted to change was make it run via  
/home/public/www/owncloud instead of /srv/http/owncloud, and under the  
user public, group users.

user public users;

worker\_processes 1;

#pid logs/nginx.pid;

events {  
worker\_connections 1024;  
}

http {  
include mime.types;  
default\_type application/octet-stream;

```
sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

```

server {  
listen 80;  
server\_name localhost;

location / {  
root /home/public/www/owncloud;  
index index.html index.php;  
}

location ~ .php$ {  
root /home/public/www/owncloud;  
fastcgi\_pass unix:/var/run/php-fpm/php-fpm.sock;  
fastcgi\_index index.php;  
fastcgi\_param SCRIPT\_FILENAME  
/home/public/www/owncloud/$fastcgi\_script\_name;  
include fastcgi\_params;  
}  
}

}

Using this config file, when i give the server’s IP (192.168.0.101)  
all I get is a blank page. No error messages, no warnings, nothing in  
the log files. Just a blank page. if I give i192.168.0.101/index.php,  
nothing changes. Anyone got any ideas as to what may be happening?  
I’ve been staring at config files, and wiki’s for the last 3hrs so it  
may just need a fresh set of eyes.

---

<div class="post-metadata">

**Author:** ![ericgoodwin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c68b51/32.png) [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Post date:** [October 24, 2011, 7:56am UTC](https://www.ruby-forum.com/t/nginx-displaying-blank-page-doesnt-error/213105/2 "2011-10-24T07:56:37Z")

</div>

Hi!

You can see blank page because you have display\_errors=off in php.ini,  
or  
may be you haven’t enough error\_reporting level.

Also I think this can be because php configured with suhosin path.

2011/10/24 Eric G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![ericgoodwin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c68b51/32.png) [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Post date:** [October 24, 2011, 7:45pm UTC](https://www.ruby-forum.com/t/nginx-displaying-blank-page-doesnt-error/213105/3 "2011-10-24T19:45:31Z")

</div>

Was able to figure it out after a fresh night of sleep and some more  
googling; the reason it worked under /srv/http but not under  
/home/public; was because in /etc/php/php-fpm.conf there was a  
semi-hidden line for

user  
group

and they were both set to http; which is fine for /srv/http/ cuz http  
owns them; but since its a home directory, it needed to be

user public  
group users

Thanks anyway guys; if nothing else you made me start looking at it  
being php’s fault instead of nginx’s haha
