Hi, I have a problem with setting the document root for certain projects. In the options I set this: root {DOCROOT} / public; but Nginx does not accept this configuration because the configuration is 2 times set the "root" I'm using version 1.6.1 Nginx. Regards
Not working i have this info on mail: 20.11.2014-11:33 - WARNING - Reason for nginx restart failure: Restarting nginx: nginx failed! nginx: [emerg] "server" directive is not allowed here in /etc/nginx/sites-enabled/100-domain.tld.vhost:96 nginx: configuration file /etc/nginx/nginx.conf test failed ISPConfig version 3.0.5.4 p5/ Nginx 1.6.1 dotdeb/ Debian Wheezy
i have the same problem, server merge doesnt work. my domain-options look like: location / { root {DOCROOT}/public; try_files $uri $uri/ /index.php$is_args$args; } location @php { ##merge## root {DOCROOT}/public; } the Site works, but the session was not set when i go to the root-page. Its a Zend-Framework 1 Applikation, so i set the rewrite-rule and the public folder as document-root. when i edit the vhost manually and set: root /var/www/domain.tld/web/public; the Session is working on the root-page too. But every timethe the config was rewritten, this edit is resett. what can i do?
I found the solution but also created a file vhost_ltd.err do not know why. Although this works. @till You can see why this is happening? I currently have ISPConfig 3.0.4.5p8 Debian Jessie Nginx 1.8.x Temporary solution: server { ##delete## root {DOCROOT}; } server { ##merge## root {DOCROOT}/public; }
diff output Code: 7c7 < root /var/www/domain.tld/web/public; --- > root /var/www/domain.tld/web; 95a96,102 > server { ##delete## > root /var/www/domain.tld/web; > } > > server { ##merge## > root /var/www/domain.tld/web/public; > } 107c114 < } --- > }
digging in the ispconfig sources, I understood it only "merges" or "deletes" the location blocks, so I made the following workaround: Code: # redirecting everything to inner folder location / { root {DOCROOT}/public; try_files /public/$uri /public/$uri/ /public/index.php?$query_string; }