2011年2月18日星期五

Re: Problem with nginx/0.8.54 and alias

I have an error now when i restart nginx.
/etc/init.d/nginx restart
Restarting nginx: [emerg]: pcre_compile() failed: unrecognized character
after (? or (?- in "^/phpmyadmin/(?.+\.php)$" at ".+\.php)$" in
/etc/nginx/sites-enabled/default:65
configuration file /etc/nginx/nginx.conf test failed

I have this code in /etc/nginx/sites-available/default
[code]
server {
listen 80;
root /var/www/monsite.fr;
index index.html index.htm index.php;
server_name monsite.fr;

location /phpmyadmin {
access_log off;
alias /var/www/monsite.fr/phpMyAdmin;
index index.html index.php;
}

location ~ ^/phpmyadmin/(?.+\.php)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/var/www/monsite.fr/phpMyAdmin/$NAME;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.html;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include fastcgi_params;
}

location ~ /\.ht {
deny all;
}
}
[/code]
And i have installed libpcre3, libpcre3-dev and compile the latest
source from pcre.org.

So, I replace location ~ ^/phpmyadmin/(?.+\.php)$ by location ~
^/phpmyadmin/(?.+\.php)$. I have no error but it does not work more.

Thanks.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,176110,176394#msg-176394


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

没有评论:

发表评论