Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx service does not start after configuration of /etc/nginx/sites-available/default #149

Closed
nephilim75 opened this issue Jun 17, 2016 · 4 comments

Comments

@nephilim75
Copy link

Steps to reproduce

  1. changing the /etc/nginx/sites-available/default accordingly to documentation (webroot installation)

Expected behaviour

sudo /etc/init.d/nginx start should start the nginx service again

Actual behaviour

pi@nginx:/etc/nginx/sites-available $ sudo /etc/init.d/nginx start
[....] Starting nginx (via systemctl): nginx.serviceJob for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
 failed!

Checking error log (cat /var/log/nginx/error.log):
2016/06/17 19:14:30 [emerg] 13575#0: invalid number of arguments in "location" directive in /etc/nginx/sites-enabled/default:81

/etc/nginx/sites-enabled/default is pointing to /etc/nginx/sites-available/default and line 81 shows:
/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {

Server configuration

Operating system:
debian 8 (jessie)

Web server:
nginx/1.6.2

Database:
mysql 5.5.44

PHP version:
PHP Version 5.6.22-0+deb8u1

Nextcloud version: (see Nextcloud admin page)
nextcloud-9.0.50

Updated from an older Nextcloud/ownCloud or fresh install:
trying to do a fresh installation

Where did you install Nextcloud from:
sudo wget https://download.nextcloud.com/server/releases/nextcloud-9.0.50.tar.bz2

Signing status (Nextcloud 9.0 and above):

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

not yet installed

List of activated apps:
none

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Could not open input file: occ

The content of config/config.php:
not existing yet

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here
(Without the database password, passwordsalt and secret)

Are you using external storage, if yes which one: local/smb/sftp/...
no, just internal SD

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:
Firefox, Chrome (actual one)

Operating system:
Windows 10 x64

Logs

Web server error log

n/a

Insert your webserver log here

n/a

Nextcloud log (data/owncloud.log)

n/a

Insert your Nextcloud log here

n/a

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

n/a

@tflidd
Copy link
Contributor

tflidd commented Jun 18, 2016

This is one line:
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
When you copied&pasted from the docs it probably inserted a line break.

@nephilim75
Copy link
Author

nephilim75 commented Jun 18, 2016

yes, I copied from nextcloud doku (example config) and when I removed it I got a new error in line 91. Line 91 contains:

fastcgi_request_buffering off;

Once I removed it from the config, it is working fine. But now I am not sure, if this is mandatory. Do you know that?

@tflidd
Copy link
Contributor

tflidd commented Jun 18, 2016

This option was introduced in nginx 1.7.11 (https://nginx.org/en/CHANGES-1.8). So that should be ok. However, debian is quite popular and we should see many more users complaining.

@nephilim75
Copy link
Author

Thank you so much.

Kind regards
//neph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants