Any reason not to use /var/www (breaks php5-fpm)

Asked by Marco Romeny

I notice that the ppa ( only checked 0.8.54 ) uses /usr/share/nginx/www as the webroot instead of /var/www which confuses at least php5-fpm. Any good reason for the change? Of course, it would be great if php5-fpm wouldn't just assume it, or that it owned the directory itself, but /usr/share/nginx/www seemed unusual...

I noticed when upgrading from ubuntu's stock 0.7.* to 0.8.4 ( the upgrade isn't clean -- errors out until I remove 0.7.* and install 0.8.* ) and php5-fpm refuses to serve anymore due to the now missing /var/www

Question information

Language:
English Edit question
Status:
Expired
For:
Nginx Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
mrl586 (mrl586) said :
#1

Default path /usr/share/nginx/www is good webroot for nginx default site.

Revision history for this message
Marco Romeny (marco-mimecom) said :
#2

You do realize that an upgrade to this package would break existing installations? The stack nginx+php5-fpm seem to becoming a popular choice so think there will be quite a few moans if this version was released in the wild. /var/www/nginx-default (I believe it was) was pretty good as webroot too...

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
mrl586 (mrl586) said :
#4

Yes, but this is not real bug. This is configuration issue. If webroot is /var/www/ or /var/www/something, it conflict with Apache webroot.

Revision history for this message
mrl586 (mrl586) said :
#5
Revision history for this message
Marco Romeny (marco-mimecom) said :
#6

I think the real issue is that the nginx package I installed could not be run as an upgrade, hence I removed the old nginx before installing this and thereby loosing /var/www. I agree that the configuration bug lies in php5-fpm's assumption of /var/www's existence, but I do think that nginx and apache (and any other webserver) should share the same webroot by default. /home is always /home /etc is always /etc and what you expect to find under /var/www is files for public consumption through a webserver. I would lke the ability to switch from Apache to Nginx by deinstalling Apache and installing Nginx. I understand that certain confugurations generally are more involved ( you'd transfer from mod-php to php-fpm etc), but the baseline use of serving static files should be unaffected.

Maybe this is more of a policy question, lsb maybe?